/usr/bin/scp user@example.com:~/foo/bar/*.pdf Training/
It returned a error saying "/usr/bin/scp: No match.". This is because the regex wildcard is expanded on the local machine (in this case the server) where the files are not present and therefore not found.
Whereas this one worked.
/usr/bin/scp user@example.com:~/foo/bar/\*.pdf Training/
Notice that the wildcard is now escaped so that it is ignored on the server but will be expanded when scp gets to the remote machine.
7 comments:
Thanks ! Great tip, Saved from trying to figure this out on my own
Thank you! This has been bugging me. Did a web search and found your explanation. Saved me A LOT of trouble.
Good looking out. Much appreciated.
You saved a day
I also found this to be very helpful. I'm glad it is the top hit for 'scp "no match"'
Thank you for this!
It's rare to look for a straightforward answer and find it straight away. Thank you :-)
Post a Comment