Search This Blog

Tuesday, March 31, 2009

scp fails to copy subdirs and files

Suppose xxx.xxx.xxx.xx and yyy.yyy.yy.y are the IP's of the servers and you want to copy from x to y server, then the format is

Login to yyy.yyy.yy.y

scp username@xxx.xxx.xxx.xx:/Desktop/filename /Documents

scp -R username@xxx.xxx.xxx.xx:/directory_name /Documents

Now file will be copied to /Documents in y server. If it is folder as u asked then use -r with scp, or may be -R, am not sure if its upper case or lower case. It copies the recursively. To copy a directory or folder -r ot -R option shld be used with scp. Try to copy as root user coz u may encounter permission issues when a normal user tries to copy files to desktop or / etc etc...Enjoy your copying

No comments: