Cp can't hardlink unqualified wildcard

Eric Blake eblake@redhat.com
Sat Oct 20 21:34:00 GMT 2012


On 10/20/2012 02:34 PM, Lawrence Mayer wrote:
> On 121020 12:35, Eric Blake wrote:
>> On 10/20/2012 12:50 PM, Lawrence Mayer wrote:
>>> Cp can't hardlink unqualified wildcard
>>>
>>> cp -l * DIRECTORY
>>>
>>> fails with error 'cp: target `file' is not a directory'
>>
>> Most likely, this is not an error in cp, but a misunderstanding on your
>> part about how globbing operates.  I bet you have a file in your current
>> directory whose name starts with '-', and is thus being treated as an
>> option by cp.
> 
> Wrong guess. No file starting with '-'.

Still, your bug report is lousy.  There is no mention of the name 'file'
in the sample command line you provided, so the error message you
reported does not match up to the command line that you reportedly used.
 Without seeing the exact problem, we can only guess at what you are
doing wrong.  Please provide an exact transcript of what you typed and
the error you got, as well as enough context that we can reproduce the
problem.  Also, please show what 'echo cp -l * DIRECTORY' (or whatever
the EXACT command is that you are typing, prepended by echo), so that we
can see that the glob is expanding to.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20121020/cef765e9/attachment.sig>


More information about the Cygwin mailing list