[Top][All Lists]

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

Re: RFC: cp -if a b: should it prompt? POSIX says `yes', most don't

From: Paul Eggert
Subject: Re: RFC: cp -if a b: should it prompt? POSIX says `yes', most don't
Date: Thu, 19 Feb 2004 12:01:43 -0800
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (usg-unix-v)

I should mention for other bug-coreutils readers that this topic has
been discussed extensively on the austin-group mailing list over the
last couple of days; see

Highlights: draft versions of POSIX had -f disable a previous -i, but
this apparently was yanked from POSIX in 1990 (at FSF's request!); see
Andrew Josey, the Austin Group Chair, has said that he will raise a
defect report; see

As I understand it, Jim's current thought is that -f should cancel a
preceding -i, but -i should not cancel a preceding -f.  That is, "cp
-f -i" would not change from the current coreutils meaning, but "cp -i
-f" would be changed so that it would be equivalent to "cp -f".
Hence, "cp" would still differ from both "rm" and "mv" (where -i and
-f both cancel each other).

The main motivation here, I think, is that if you have an alias like

alias cp cp -i

then "cp -f" should cancel the -i.  This alias is (or was) common for
root on Red Hat systems.

Presumably if the POSIX standardization committee doesn't allow the
proposed behavior when it responds to the defect report, then GNU cp
would still stick to the current behavior if POSIXLY_CORRECT is set.

reply via email to

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