GNU bug report logs - #8405
Information needed for 'cp'

Previous Next

Package: coreutils;

Reported by: aakanksha gaur <aakanksha.gaur <at> gmail.com>

Date: Fri, 1 Apr 2011 16:20:03 UTC

Severity: normal

Tags: notabug

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8405 in the body.
You can then email your comments to 8405 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8405; Package coreutils. (Fri, 01 Apr 2011 16:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to aakanksha gaur <aakanksha.gaur <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 01 Apr 2011 16:20:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: aakanksha gaur <aakanksha.gaur <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Information needed for 'cp'
Date: Fri, 1 Apr 2011 14:12:19 +0530
[Message part 1 (text/plain, inline)]
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


Can I please know the rationale behind this behavior?



Thanks
Aakanksha Gaur
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8405; Package coreutils. (Fri, 01 Apr 2011 17:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 8405 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: aakanksha gaur <aakanksha.gaur <at> gmail.com>
Cc: 8405 <at> debbugs.gnu.org
Subject: Re: bug#8405: Information needed for 'cp'
Date: Fri, 01 Apr 2011 11:28:07 -0600
[Message part 1 (text/plain, inline)]
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   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8405; Package coreutils. (Sat, 02 Apr 2011 06:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 8405 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: aakanksha gaur <aakanksha.gaur <at> gmail.com>
Cc: 8405 <at> debbugs.gnu.org
Subject: Re: bug#8405: Information needed for 'cp'
Date: Sat, 02 Apr 2011 08:51:28 +0200
tags 8405 + moreinfo notabug
thanks

Eric Blake wrote:
> 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.

By sending to bug-coreutils <at> gnu.org (rather than to coreutils <at> gnu.org)
you have automatically created a bug report (http://debbugs.gnu.org/8405).
Since this seems to be due to a misunderstanding and not a bug,
I'm marking it as "notabug".  Of course, if you provide
details showing there is a legitimate bug, we'll adjust that.




Added tag(s) notabug. Request was from Jim Meyering <jim <at> meyering.net> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2011 16:53:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 8405 <at> debbugs.gnu.org and aakanksha gaur <aakanksha.gaur <at> gmail.com> Request was from Jim Meyering <jim <at> meyering.net> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2011 16:53:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 05 Sep 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.