EN
Linux - copy entire directory with scp
4
points
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.