GNU bug report logs - #12365
Incorrect return value of cp with no-clobber option

Previous Next

Package: coreutils;

Reported by: Anoop Sharma <sendtoanoop <at> gmail.com>

Date: Thu, 6 Sep 2012 11:59:01 UTC

Severity: normal

Tags: wontfix

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Anoop Sharma <sendtoanoop <at> gmail.com>
To: 12365 <at> debbugs.gnu.org
Subject: bug#12365: Incorrect return value of cp with no-clobber option
Date: Thu, 6 Sep 2012 17:27:52 +0530
When -n (--no-clobber) option of cp is used and the DEST file exists, then, as
expected, cp is not able to copy the SOURCE to DEST.

However, cp returns 0 in this case.

Shouldn't it return 1 to indicate that copy operation could not be completed?

In absence of this indication how is one to know that some recovery
action like re-trying cp with some other DEST name is required?

Regards,
Anoop




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

Previous Next


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