Re: [off-topic] rm -r on a used directory
On 14 Jan, Adrian Bridgett wrote:
> 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.
Are you sure that it works without a problem?
$ rm -r ../../foo ; echo $?
rm: ../../foo: No such file or directory
rm: ../../foo: No such file or directory
1
it failed, as you can see ...
$ ls .
/bin/ls: .: No such file or directory
... and leaves you in troubles ...
$ ls -lA /tmp/a/b/c/
total 1
drwxr-xr-x 2 fab fab 1024 Jan 15 11:12 foo
without having removed the requested dir
I think that AIX behaviour is better.
Are you sure that Posix doesn't require that . should always exist?
A lot of programs require that (find, for example).
Fabrizio
--
| fpolacco@icenet.fi fpolacco@debian.org fpolacco@pluto.linux.it
| Pluto Leader - Debian Developer & Happy Debian 1.3.1 User - vi-holic
| 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E
> more than 35 months are needed to get rid of the millennium. [me]
>If NT is your answer, means you didn't understand the question.[som1]
--
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: