Languages
[Edit]
EN

Linux - copy entire directory with scp

1 points
Created by:
Marcin
15470

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.

 

Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join