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

Nathan O'Sullivan nathan at mammoth.com.au
Fri Feb 3 05:51:11 UTC 2012


-- 
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:
  New

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