Re: rm(1) bug, possibly serious



Oliver Fromme wrote:
Nicolas Rachinsky wrote:
> Oliver Fromme wrote:
> > By the way, an additional confusion is that ".." and "../"
> > are handled differently. Specifying ".." always leads to
> > this message:
> >
> > rm: "." and ".." may not be removed
> >
> > and nothing is actually removed. It is confusing that
> > adding a slash leads to a different error message _and_
> > removal of the contents of the parent directory. Clearly
> > a POLA violation.
>
> Adding a slash often leads to different behaviour.

Yes, I'm aware of that. I often make use of the feature
that "find /sys/" expands the symlink, while "find /sys"
does not. The same holds true for ls(1).

However, I would still argue that there is no sane reason
for "rm -rf ../" behaving differently from "rm -rf ..",
especially because it behaves differently in a destructive
way. That's why I call it a POLA violation.

Also a POSIX violation IMHO :-)

Cheers,
--
Xin LI <delphij@xxxxxxxxxxx> http://www.delphij.net/
FreeBSD - The Power to Serve!

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: rm(1) bug, possibly serious
    ... > Oliver Fromme wrote: ... It is confusing that ... The rm utility removes symbolic links, not the files referenced by the ... That's why I call it a POLA violation. ...
    (freebsd-stable)
  • Re: Desired behaviour of "ifconfig -alias"
    ... On Monday 12 February 2007 11:57 pm, Oliver Fromme wrote: ... It doesn't mean it is confusing to everybody. ... All IPs on an interface are equal. ... term alias exists only for historical reasons, ...
    (freebsd-stable)
  • Re: rm(1) bug, possibly serious
    ... In the last episode, Oliver Fromme said: ... It is confusing that adding a ... Dan Nelson ...
    (freebsd-stable)