bug-coreutils
[Top][All Lists]
Advanced

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

Re: exit status of rm


From: Paul Eggert
Subject: Re: exit status of rm
Date: Thu, 23 Jun 2005 18:46:24 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

address@hidden (Eric Blake) writes:

> is it worth bringing this up with the austin group?

Probably not; I doubt whether they'd change the spec.

> Is it worth changing rm to be consistent in its status regardless of
> options

No.  I kind of like it the way that it is.

> Furthermore, it is always possible for forced deletes to match POSIX
> requirements by using this idiom, since the file '' does not exist:
> rm -f `generate a list` ''

I'm not sure that would work with ancient (non-Posix) Unix systems
(SunOS 4, perhaps?)  where "" is an alias for ".".  You might get a
diagnostic for the "".  (It's hard to be sure about this nowadays.)

The usual solution is something like this:

  rm -f _ `generate a list`

where _ is known to not exist (or, if it does exist, you want it to be
removed).

> Should this be mentioned in the autoconf portability documentation?

That would be nice; can you please write it up?




reply via email to

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