Monday, March 23, 2026
Centos

scp or sftp copy multiple files with single command

Copy multiple files from remote to local:

$ scp your_username@remote.edu:/some/remote/directory/\\{a,b,c\\} ./ 

Copy multiple files from local to remote:

$ scp foo.txt bar.txt your_username@remotehost.edu:~ $ scp {foo,bar}.txt your_username@remotehost.edu:~ $ scp *.txt your_username@remotehost.edu:~ 

Copy multiple files from remote to remote:

$ scp your_username@remote1.edu:/some/remote/directory/foobar.txt \\ your_username@remote2.edu:/some/remote/directory/ 

Copy from local to remote example :

scp -r /home{user1,user2,user3,user4,user5} root@111.xxx.xxx.x:/home
Baca Juga :  Solusi error ketika update percona, Percona-Server-shared-compat-57 conflicts with Percona-Server-shared-56-5.6.51-rel91.0.1.el7.x86_64

Similar Posts