tags:

views:

69

answers:

2

Hi, I use this command to copy all files whose names start with 'file' from a server. scp -vp me@server:/location/files* ./

But i got a 'No Match' error. probably Concerning the '' in the command. How can i protect the '' for ssh to understand that this refers to a list of files and not taking it as a filename.

Thx August

A: 

The shell itself is expanding the *. You can escape this by quoting it or using backslashes to prevent the shell interpreting it and instead passing it directly to scp:

scp -vp me@server:/location/files\*
Brian Agnew
A: 

if you want files started with file then it should be

scp me@server:/location/file* .

not

files*

btw, scp does support wild card, so * works, more info read http://www.hypexr.org/linux_scp_help.php