Scp all files starting with 'file' from the server

I use this command to copy all files whose names begin with a β€œfile” from the server. scp -vp me @server: / location / files *. /

But I have a "No match" error. probably relative to the "" in the team. How can I protect '' for ssh to understand that this refers to a list of files and does not accept it as a file name.

thanks august

+7
ssh scp
source share
2 answers

The shell itself extends * . You can avoid this by specifying it or using a backslash to prevent shell interpreter interpretation and instead pass it directly to scp :

 scp -vp me@server:/location/files\* 
+20
source share

if you want files to start with a file then this should be

 scp me@server:/location/file* . 

not

files *

+1
source share

All Articles