[comp.unix.questions] RM flags: a correction ...

limes@sun.uucp (Greg Limes) (06/02/88)

In article <1833@silver.bacs.indiana.edu> creps@silver.UUCP (Steve Creps) writes:
>In article <1044@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes:
>>In article <1827@silver.bacs.indiana.edu>, creps@silver (Steve Creps) writes:
>>> - To set default flags for a command (i.e. "alias rm rm -i" makes -i a default
>>>   flag for rm instead of -f)
>>"-f" is NOT a default for rm.
>
>   It is on our system (which runs Ultrix 2.0). Actually, from what I've heard
>on the net, "-f" is indeed the default for rm on most Unix-based systems. At
>least, I've heard people say "-f" is the default, but have never before heard
>anyone say "-i" is.

I hope that "-f" is not the default under Ultrix; it certainly is not
under the Berkeley and Sun versions of UNIX, where NEITHER "-i" nor
"-f" is the default.

Normally, "rm" asks for confirmation if and only if you do not have
write permission for the file involved. If you do not have write
permission for the parent directory, an error is reported.

If "-i" (inquire) is used, "rm" always asks for confirmation.

If "-f" (force) is used, "rm" will always remove the file if it can
write to the directory, and will be silent if there is an error.

I suggest you run a few tests to convince yourself; start by making a
play directory with some empty files (and maybe directories).

If "-f" is the default under Ultrix, let me know; my father is still
convinced that Ultrix is the the same as 4.2BSD ...