Subject: Re: Little prob with rm
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@deshaw.com>
List: current-users
Date: 10/29/1994 00:05:53
In article <199410280633.HAA00250@euterpe.owl.de> martin@euterpe.owl.de (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
thing. Consider:
% rm -fr foo
% cat > foo/
bar baz
^D
% echo */
The semantics are:
svr4 == bsd
---------------------
path/. path/
path/ path
And it is not a problem with rm! Every utility works the same way....
christos