Public bug reported:

In some environments, cp / mv / rm will be aliased to 'cp -i' 'mv -i'
'rm -i' to reduce the chance of data loss.

mv and rm allow -f to force overwrite (even when -i is used); but cp
does not - which is both inconsistent with the other tools and annoying
in such alias'd environments. Example:

nats@nathan:~$ bash --norc
bash-4.2$ alias cp='cp -i'
bash-4.2$ alias rm='rm -i'
bash-4.2$ alias mv='mv -i'
bash-4.2$ touch file1
bash-4.2$ touch file2
bash-4.2$ cp -f file1 file2
cp: overwrite `file2'? y
bash-4.2$ mv -f file1 file2
bash-4.2$ rm -f file2

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: coreutils 8.5-1ubuntu6
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Fri Feb  3 15:44:01 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
 LANGUAGE=en_AU:en
 PATH=(custom, no user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: coreutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug oneiric

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/925876

Title:
  "cp -i -f": -f does not override -i like it does in other coreutils

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/925876/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to