Transfering files to and from your workstation

From CUC3
Revision as of 23:55, 7 July 2008 by import>Mp466
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

First off you should only be using programs that use the ssh libraries for transferring files. Furthermore you should not be using a system that allows rcp and the like because they send unencrypted passwords.

1. scp is on option

The below will transfer a single file TEMP

 scp ''TEMP''  $USER@$REMOTEHOST:~

The directory will recursivel transfer an entire directory DIRECTORY

 scp -r ''DIRECTORY''  $USER@$REMOTEHOST:~

2 rsync is a more powerful utility that will send the differences between files or directories; therefore it can be much quicker than scp. Rsync can also preserve the permissions of the files and directories. Rsync has multiple options so you will need to read the documentation for more details. Rsync is ideal for backups as well.

The directory will recursively transfer an entire directory DIRECTORY

 rsync -Pavu -e ssh ''DIRECTORY''  $USER@$REMOTEHOST:~