Copying Files Between Windows and Linux using PuTTY


File transfers can be done using PSCP (Putty Secure CoPy) or by using PSFTP (Putty Secure File Transfer Protocol). 

PSFTP can be launched from the Windows Start.

PSCP must be launched from within a DOS box (StartWingdings"">àRun and enter cmd, then press OK).  Before
running PSCP, you need to set the path variable.  At the DOS command prompt, type

set PATH=C:\Program Files\PuTTY

This assumes you installed PuTTY in C:\Program Files\PuTTY (default).  Note the “\” slash.   

This will only work for the lifetime of that particular console window. To set your PATH more permanently on Windows NT, 2000, and XP, use the Advanced tab of the System Control Panel (right-click on MyComputer then select Properties).  Click the Environment Variables button, high-light “path” and edit it.  Add “;C:\Program Files\PuTTY” at the end of
the line.  You can then verify the path is correct by typing “path” at the DOS prompt.

The format for pscp is straight forward:

pscp [options] source destination

To copy a Windows file to Linux system, at the DOS prompt, type

pscp c:/music.mp3  ubuntu@10.0.0.3:/home/ubuntu/Music

which will copy the file music.mp3 to my Music folder into Linux.  My Ubuntu EVK has an ip address as 10.0.0.3.  (Note that you can use either / or \ for the Windows files and directories, but you must use / when specifying the Linux files.)

The reverse works as well (copy Linux file to Windows)

            pscp ubuntu@10.0.0.3:/home/ubuntu/Music/music.mp3 c:/

This copies the music.mp3 file from Linux into my C root directory.

may be use cp -r orginal_file new_file
ref.


Popular posts from this blog

เทคนิค ชนะ เกมเศรษฐี 14 ตารวด!!! ( Let's get Rich )

Using Google Chrome Inspect Element to Analyze the website

Easy way to download whole youtube play list and convert them to mp3