How to scp multiple files from remote to local on Linux?

With scp, copying several files such as file1 file2 to remote site can be passed by command line like

$ scp file1 file2 user@remote:

But how to scp multiple files from remote to local on Linux?

asked Feb 11, 2016 by anonymous

1 Answer

You can do similar things by at least 2 method with scp:

$ scp user@remote:file\{1,2\} ./

$ scp user@remote:"file1 file2" ./

Or for a list of files in the same naming format like file1, file2, ... file9:

$ scp user@remote:file? ./
answered Mar 4, 2016 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...