Subject: Re: Little prob with rm
To: None <email@example.com>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 10/29/1994 00:05:53
In article <199410280633.HAA00250@euterpe.owl.de> email@example.com (Martin Husemann) writes:
>> Found an interesting, er..., problem (?) with rm the other day. Doing
>> an 'rm -rf' on some directory, say '/tmp/fred', by typing 'rm -rf
>> /tmp/fred', works fine, but typing 'rm -rf /tmp/fred/' complains that
>> /tmp/fred/ is a directory.
>This is an old BSD vs. SysV difference. I never understood why that
>would be useful, but it's in all BSD's I've worked with.
This is not exactly true. Namei() was changed in SVR4 and other posix
machines (and semi posix machines including sunos >= 4.1.3)
to ignore any number of trailing slashes. This is not a great
% rm -fr foo
% cat > foo/
% echo */
The semantics are:
svr4 == bsd
And it is not a problem with rm! Every utility works the same way....