Scp

From Support

Jump to: navigation, search

Scp is a command line utility you can use to copy files and folders into your userspace, or from your userspace to another UNIX machine. The basic usage of this program is: scp myFile.txt myusername@some.unix.server.com:~/myfolder Once you have typed the command and pressed enter the system will ask you for your password. This is the password associated with your account on the remote machine.


Some Examples

scp code.c netsoc_username@login.netsoc.tcd.ie:~/www/
This will copy the file code.c from the UNIX machine you are currently using(possibly a maths PC, a PC from LG12 or a Sun machine) to the www folder in your Netsoc userspace.

scp -r photos/ netsoc_username@login.netsoc.tcd.ie:~/www/
This does the same as the previous example but copies a whole folder to the www folder in your userspace. The "-r" option ensures that all files and folders within the "photos" folder will be copied also.

scp tcd_username@lg12x29.cs.tcd.ie:~/myproject.txt ~netsoc_username/projectwork
This command will copy the file "myproject.txt" from the lg12x29 PC to the "projectwork" folder in your netsoc userspace.

For a more comprehensive guide to using scp simply type "man scp".

See Also

Personal tools