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

[off-topic] rm -r on a used directory



At work on AIX, if I do this:

  mkdir foo
  mkdir foo/bar
  cd foo/bar
  rm -r ../../foo

the last command fails as it is my current directory. This works without a
problem on Linux - it just leaves me in a non-existant dir. I've had a look
at the Unix98 specs and it helpfully says that it is undefined whether the
command will succeed or fail with an error.

Now to the question - I can see both sides of the argument, but in the unix
tradition of giving you enough rope to hang yourself with, why does AIX (and
others?) give an error? It's irritating since I have to run the program
about another four times before it will fix the problem.

Adrian

email: adrian.bridgett@poboxes.com       | Debian Linux - www.debian.org
http://www.poboxes.com/adrian.bridgett   | Because bloated, unstable 
PGP key available on public key servers  | operating systems are from MS


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: