[Bug 925876] Re: "cp -i -f": -f does not override -i like it does in other coreutils

C de-Avillez hggdh2 at ubuntu.com
Fri Feb 3 19:50:37 UTC 2012


Thank you for opening this bug and helping make Ubuntu better.

Indeed 'cp' behaviour is different.

cp: specifying '-i' (alternatively, '-f') does not override a previous '-f' (alternatively, '-i)
mv, rm: the final '-i' or '-f' in the parameter's sequence will win

This will need a bit of re-reading the info pages -- these options are
not quite the same on all commands.

Now you do realise that you can use '-nf' as an override on 'cp', right?

For now, marking Confirmed/WishList
rm: 


** Changed in: coreutils (Ubuntu)
   Importance: Undecided => Wishlist

** Changed in: coreutils (Ubuntu)
       Status: New => Confirmed

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

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

Status in “coreutils” package in Ubuntu:
  Confirmed

Bug description:
  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 at 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)

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




More information about the foundations-bugs mailing list