cygwin - file copy to UNC share cygwin - file copy to UNC share windows windows

cygwin - file copy to UNC share


UNC paths are mapped to Cygwin paths by replacing \ characters with / characters.

For example, a file that appears in Windows as

\\server\dir1\dir2\foo.txt

should appear in Cygwin as:

//server/dir1/dir2/foo.txt

If that doesn't work (it should), you can also map a drive letter to a UNC path. For example, if you map \\server\dir1 to S:\, then the same file (S:\dir2\foo.txt) should appear in Cygwin as /cygdrive/s/dir2/foo.txt.

In short, a Cygwin command can treat a directory with a UNC path as an ordinary directory.

See https://cygwin.com/cygwin-ug-net/using.html#unc-paths