The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

scp tricks 7 March 2003
Share
Need more help on this topic? Click here
This article has 23 comments
Show me similar articles

If you don't know about scp, then today is your lucky day. It is a great tool for copying file around. In the following examples, here are the terms I will use:

  • remotebox is the IP address or hostname of the remote box.
Here are a few pratical examples to help you get started:
  • copy a file to a remote system:

    scp a remotebox:

  • copy a file to a remote system, and put it somewhere other than your home directory:

    scp a remotebox:/var/tmp

    That will copy a from your current working directory to /var/tmp on the remote box.

  • copy a file to a remote system but a different user id:

    scp a mark@remotebox:

  • copy file from a remote system:

    scp remotebox:a .

  • copy file from a remote system, different login:

    scp mark@remotebox:a .

  • copy recursively from a remote system, different login:

    scp -r mark@remotebox:a .

  • copy a number of files from a remote system to a specified directory locally:

    scp remotebox:\{a,b,c\} ~/my/secret/dir

If you have more good ideas about scp, please put them in the article comments. Thank you.
Share
Need more help on this topic? Click here
This article has 23 comments
Show me similar articles