Tuesday, May 24, 2011

How to copy multiple file from remote host using scp

To copy complete folder then -r swich can be used,

scp -r user@host:folder_path source_path_of_current_machine

To copy selected file from folder, then specify path1 and path2 of file separated by space

scp user@host:"path1 path2" source_path_of_current_machine

And if file is in the same folder then bash file expansion enclosed in double quote can be used,

scp user@host:"foder_path/{file1,file2}" source_path_of_current_machine




No comments:

Post a Comment