June 28, 2007

How do I copy files from a linux server to my local machine w command line?

I have logged in using ssh and now want to copy several directories off the server to my local machine.

  1. I attempted with "cp <destination file> <local machine>:<source file>" am I on the right track?
  2. scp is one way, or (if you are root on the linux server) you can set up a samba server and share files like you would share them on Windows machines.
  3. Yes, you're on the right track. "scp" is a combination of "ssh" and "cp". On your local machine, you can say

    scp <remote machine>:<source file> <destination file>

    to grab the file from the Linux server (or any other machine with an ssh server running).

    Oops - here is more info:

    You said you want to copy several directories. To copy an entire directory with scp, you can use the "-r" flag like this:

    scp -r <remote machine>:<source directory> <destination directory>

    That will copy the directory and all files and subdirectories under it to your local system.

Tags: ,

Tell a Friend Today!

del.icio.us Digg Furl Reddit Ask BlinkList blogmarks Blogg-Buzz Google Ma.gnolia Netscape ppnow Rojo Shadows Simpy Socializer Spurl StumbleUpon Tailrank Technorati Windows Live Wists Yahoo! Help

Permalink • Print

Track this entry

RSS BlogPulse

RSS Technorati Cosmos

Related Searches

, , , ,