Languages
[Edit]
EN

Linux - copy entire directory with scp

1 points
Created by:
marc_so
264

Hi, today I would like to show you how we can copy entire folder with all of it's files using SCP command under linux.

Below command copy entire directory from remote server to local machine:

scp -r root@2.2.2.2:/home/my_dir /home

It will copy entire my_dir from remote server and it will be copied to /home/my_dir on current computer.

-r flag means recursively - scp will copy all files below given directory recursively. 

From manual:

scp - secure copy (remote file copy program)

-r Recursively copy entire directories. 
Note that scp follows symbolic links encountered in the tree traversal.

 

See also:

Linux

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join