Wednesday, January 18, 2012

Command to copy files or folder over network

- On Windows, we can use command xcopy to copy file or folder over network

  +copy file
c:\>xcopy localfile "\\server\share-folder"
c:\>xcopy "\\server\share-folder\file" localfolder
  +copy folder
c:\>xcopy localfolder "\\server\share-folder" /S
c:\>xcopy "\\server\share-folder" localfolder /S

- On linux we  can use scp or rsync

#scp document.pdf bob@           (will copy document.pdf to bob home dir)
#rsync -arv user01@server:/home/user01/ /home/bob/user01backup/

No comments:

Post a Comment