GNU bug report logs - #18681
The Linux cp command has bugs

Previous Next

Package: coreutils;

Reported by: "Polehn, Mike A" <mike.a.polehn <at> intel.com>

Date: Fri, 10 Oct 2014 17:30:02 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: "Polehn, Mike A" <mike.a.polehn <at> intel.com>
Cc: "18681 <at> debbugs.gnu.org" <18681 <at> debbugs.gnu.org>, Assaf Gordon <assafgordon <at> gmail.com>
Subject: bug#18681: The Linux cp command has bugs
Date: Sat, 11 Oct 2014 08:48:54 +0900
Hi Polehn,

The -f option isn't `suppress interactive' in cp.  It attempts to unlink
a destination not to be able to override.  It's different from the option
in mv.

As the behavior is clearly defined in POSIX as Eric says, we won't be
able to change it.

BTW, I don't like the alias `cp -i'.  So I remove it from .bashrc always
immediately after an installation of a distribution. (^_^)

If you temporarily want to cancel the the alias, you can define an another
alias as `cpf', and/or can use below instead of `cp'

  - command cp -f
  - /bin/cp -f
  - ( unalias cp; cp -f ... )

Even if add new option `-F' to supress interactive to cp, we need to use
-F for cp and -f for mv to do it.





This bug report was last modified 10 years and 212 days ago.

Previous Next


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