[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8405: Information needed for 'cp'
From: |
Eric Blake |
Subject: |
bug#8405: Information needed for 'cp' |
Date: |
Fri, 01 Apr 2011 11:28:07 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9 |
On 04/01/2011 02:42 AM, aakanksha gaur wrote:
> Hi,
>
> I need to know what is the rationale behind this behavior ?
>
>> cp aa bb
> aa does not exist and neither does bb. No warning is thrown on performing
> this operation.
>
> However,
> if I do
>
>> cp dd cc
> where cc is a non empty file, then a warning is thrown about the source file
> being empty| invalid.
> This is the warning thrown.
>
> cp: cannot stat `dd': No such file or directory
That's not a warning about being empty/invalid, but a warning about 'dd'
not existing in the first place.
>
>
> Can I please know the rationale behind this behavior?
Most likely, you are mistaken, and 'aa' _did_ indeed exist. cp _always_
warns about a missing source file.
But to know that for sure, it would help to see a complete trace of your
shell session where you were testing, including ls output along the way,
where you claim to reproduce the problem.
It may also help your debugging to try 'type cp' to make sure there
aren't any shell functions or aliases interfering with normal operation,
as well as use 'set -vx' prior to cp to see what the shell really did
run. Also, 'cp -v' makes cp more verbose about what it did and tried.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature