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

Posted on In QA

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?

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? ./

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *