|
|
|
|
#1 |
|
Prospect
Join Date: Apr 2004
Posts: 24
|
Scp'in to self
Hi.
I'm having the following problem in Panther... If i do: scp jęd@remote_machine:/home/jęd/foo.ff . I am fine... If I do: scp jęd@remote_machine:/home/jęd/*.ff . I have the message: tcsh: scp: No match. I can log into my ibook of from a linux box (the reqests are from a remote linux box)... Any suggestions...? |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Feb 2004
Posts: 278
|
Try protecting the asterisk with quotes, otherwise it will do file matching on the machine you are running scp from.
Code:
scp 'jęd@remote_machine:/home/jęd/*.ff' . |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jan 2002
Posts: 10,652
|
Try putting some quotes around the user@remotehost:*.foo.
D'oh! Huskerchad beat me to it! But he's right. This will work with wildcards.
__________________
Chameleon's Consignment Loft] |
|
|
|
|
|
#4 |
|
All Star
Join Date: Apr 2003
Location: OH
Posts: 934
|
hot dog that's awesome; i've been doing it file-by-file or dumping the files into a folder and using rsync.
|
|
|
|
|
|
#5 | |||||||||||||||||||||||
|
Prospect
Join Date: Apr 2004
Posts: 24
|
That works perfectly... Why does it need the quotes? I've never had to do that on 'nix boxes... |
|||||||||||||||||||||||
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Feb 2004
Posts: 278
|
You need them because you want the wildcard to expand on the remote machine. When you type something like
Code:
commandname pattern* So when you do "scp jęd@remote_machine:/home/jęd/*.ff ." the shell does pattern maching (before scp is executed); I'm assuming the colon after the remote machine name causes the matching to be performed for files matching "/home/jęd/*.ff", but you probably don't have such a directory on your OS X machine, thus no files match, and you get the error: note that your error was coming from the shell "tcsh". This is the same in virtually any shell, it is nothing specific to OS X. It is possible this command might work for you as you intended from one unix machine to another, if both machines have your home directory at "/home/jęd" and on both machines, you have these ".ff" files in your home directory. |
|
|
|
|
|
#7 |
|
Major Leaguer
Join Date: Feb 2004
Posts: 278
|
Actually, now that I think about it there may be one other thing going on. If no files match a wildcard patter, bash will leave the string as-is, while tcsh gives an error. To see this, compare the results of
Code:
bash -c "/bin/echo nofile*" Code:
tcsh -c "/bin/echo nofile*" So when the scp command above is issued from the bash shell, and no local files match the pattern, it is passed on to the scp command as-is (including the wildcard character). When it is issued from tcsh and no files match, an error occurs. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|