Wednesday, March 7, 2012

Copy a file from Windows to Linux

If you are looking to copy a file from Win XP to Ubuntu 9.04:

On your Windows PC, download pscp.exe from here.

Suppose you copied the pscp.exe to a folder called linux on D drive and the file you want to transfer from Windows to Linux is bak.zip then the command :
d:\linux\pscp.exe d:\bak.zip linux_user@linux_ip_address:/windows
will copy the d:\bak.zip to a folder called windows under / on Linux.

If you get an error like :
pscp: unable to open <file name>: permission denied.
It means that the linux_user you are looing into the server with does not have write permissions to the specified folder called windows in this case. This folder was probably made by su or at least logged in as sudo su.
Run the following command logged in as sudo su to eliminate this problem.
chown linux_user /windows

To learn how to transfer a file from Linux to Windows, click here.

0 comments:

Post a Comment