Jump to content






Photo
- - - - -

HOWTO use scp

Posted by notKlaatu , 29 March 2008 · 105 views

WHATIS:scp is a Secure CoPy, akin to ssh. A convenient but encrypted way to move files from machine to machine on your network.A REALLY GOOD HOWTO:Linux Tutorials Blog...or you can read my very brief but-it-does-the-trick HOWTO:(I do recommend you check out the HOWTO on Linux Tutorial Blog at some point for all the cool tricks you can do with scp)The syntax for the scp command is as follows: scp [options] [[user@]host1:]filename1 ... [[user@]host2:]filename2 For example, if user klaatu is on a computer called fedora.laptop, and wants to copy a file called file.txt to slackware.com, he would enter the following: scp file.txt klaatu@slackware.comif he wanted to place file.txt specifically into a directory called destination/ then he would do this:scp file.txt klaatu@slackware.com:destinationor to be extra safe, you could give the complete path, like so:scp file.txt klaatu@slackware.com:/home/klaatu/DocumentsLikewise, if he wanted to copy the entire contents of the destination/ directory on slackware.com back to his fedora.laptop (so that's FROM a remote machine TO the machine you're sitting in front of), he would enter:scp -r klaatu@slackware.com:/home/klaatu/directory destinationSimilarly, if he is working on an entirely different computer, but wanted to copy a file called file.txt from his home directory on fedora.laptop to a directory called desitination in his account on slackware.com, he would enter: scp klaatu@fedora.laptop:file.txt klaatu@slackware.com:destinationWhen using wildcards (e.g., * and ? ) to copy multiple files from a remote system, be sure to enclose the filenames in quotes...because the shell expands unquoted wildcards.




December 2014

S M T W T F S
 123456
78910111213
14151617181920
21 222324252627
28293031   

Recent Entries

Recent Comments

Search My Blog

BinRev is hosted by the great people at Lunarpages!