Cygwin copy/paste to Windows (and vice-versa
Posted: 09 Oct 2015, 22:12
For Cygwin, there is documentation online about how to access Windows files (outside the Cygwin environment). This documentation doesn't say much at all about copying/pasting to the Windows environment from Cygwin, the documentation states mostly about how to just access files on your c:\ drive.
To copy files from Cygwin to the c:\ drive, we want to keep in mind that Cygwin names your c:\ drive in Windows as: /cygdrive/c.
First what we want to do, is create a symlink (short for symbolic link) to the c:\ drive by pulling up a terminal in Cygwin and do:
Then, it's just a matter of changing directory in Cygwin to the files that you want to copy to your c:\ drive in Windows. For me in this case it was:
Next, it's the regular copy command to the directory in c:\ that you want the files copied to:
Since I'd made the symbolic link first, I didn't have to type /cygdrive/c, just /c, and my files are right where I wanted them.

There are those saying that one can use just c:\<folder> now, but I prefer this method; it keeps me in the same context when I'm in Cygwin.
To copy files from Cygwin to the c:\ drive, we want to keep in mind that Cygwin names your c:\ drive in Windows as: /cygdrive/c.
First what we want to do, is create a symlink (short for symbolic link) to the c:\ drive by pulling up a terminal in Cygwin and do:
Code: Select all
ln -s /cygdrive/c /cThen, it's just a matter of changing directory in Cygwin to the files that you want to copy to your c:\ drive in Windows. For me in this case it was:
Code: Select all
cd /home/dedanna/Downloads/Core-Release-1Next, it's the regular copy command to the directory in c:\ that you want the files copied to:
Code: Select all
cp *.* /c/Users/dedanna/Downloads/linux-updates/core-releaseSince I'd made the symbolic link first, I didn't have to type /cygdrive/c, just /c, and my files are right where I wanted them.

There are those saying that one can use just c:\<folder> now, but I prefer this method; it keeps me in the same context when I'm in Cygwin.