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"
  or
c:\>xcopy "\\server\share-folder\file" localfolder
  +copy folder
c:\>xcopy localfolder "\\server\share-folder" /S
 or
c:\>xcopy "\\server\share-folder" localfolder /S

- On linux we  can use scp or rsync
Example

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

No comments:

Post a Comment