bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fileutils > 4.0 version


From: Jim Meyering
Subject: Re: Fileutils > 4.0 version
Date: Fri, 04 Jan 2002 13:54:57 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)

Christoph Plattner <address@hidden> wrote:
> why did you change the policy of the `-i' and `-f' usage after
> the version 4.0 of the fileutils package. (For example in
> 4.0.36, or 4.1).

Because that's not consistent with the POSIX specification
that describes how cp should work.  It is unfortunate that
-i and -f don't mean the same thing with cp as with mv.
For that reason, with newer versions of the fileutils cp and
mv both accept the --reply[=HOW] option:

  `--reply[=HOW]'
      Using `--reply=yes' makes `cp' act as if `yes' were given as a
      response to every prompt about a destination file.  That
      effectively cancels any preceding `--interactive' or `-i' option.
      Specify `--reply=no' to make `cp' act as if `no' were given as a
      response to every prompt about a destination file.  Specify
      `--reply=query' to make `cp' prompt the user about each existing
      destination file.

> Many UNIX users (AFAIK)and I want to use `-f' to
> override `-i'. For example I have an alias of:
>
> cp='cp -i'

You might want to use 'cp --backup=numbered' instead.
Then you won't be prompted at all, and existing files
will merely end up being renamed to emacs-style backups
like foo.c.~1~

> to be prompted before overwriting. To force overwriting,
> I used the `-f' option on the command line.
> With the newer fileutils package this is not possible any
> more.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]