× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Wildcards are resolved by the shell, not by scp. So given your example, the shell will first take a*.TXT and find all files that match. For instance, let's say it finds files named apple.TXT, alice.TXT and alleycat.TXT. It will then replace your wildcard expression with the matching filenames, so it will run:

scp apple.TXT alice.TXT alleycat.TXT b

This means the scp program will get 4 parameters. It will interpret all parameters except the last one as files to copy. The last one will be assumed to be the destination. Since there's more than one file to copy, it'll expect 'b' to be a directory, and will copy all of the files there. (Whereas, if there was only one matching file, 'b' could either be a filename or a directory -- and if b doesn't already exist, an filename would be assumed.)

Make sense?


On 8/16/2013 2:04 PM, John McKee wrote:
What does scp do given the following:

scp a*.TXT b

where there can be multiple files that start with the letter a

and

b is a directory


John McKee


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.