rmdir . - bug or feature

Pavel Machek (pavel@Elf.mj.gts.cz)
Wed, 10 Sep 1997 13:14:39 +0200


Hi!

This bug was found by mj & vojtech two days ago, but as it is still
not fixed, I'm reporting it to the list...

Well, I'm not really sure if it is bug or feature, but it definitely
broke old tar (which may not be too bad, that tar really did not
behave too well).

pavel@Elf:/tmp$ mkdir delme
pavel@Elf:/tmp$ cd delme/
pavel@Elf:/tmp/delme$ ls -al
total 17
drwxr-xr-x 2 pavel users 1024 Sep 10 13:11 ./
drwxrwxrwt 5 root root 15360 Sep 10 13:11 ../
pavel@Elf:/tmp/delme$ rmdir .
pavel@Elf:/tmp/delme$ ls -al
total 17
drwxr-xr-x 0 pavel users 1024 Sep 10 13:11 ./
drwxrwxrwt 4 root root 15360 Sep 10 13:11 ../
pavel@Elf:/tmp/delme$ > testfile
bash: testfile: Operation not permitted
pavel@Elf:/tmp/delme$ mkdir .
mkdir: cannot make directory `.': No such file or directory
pavel@Elf:/tmp/delme$

Link count of 0 seems pretty nice to me. Well, you decide if this is
correct behaviour.

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).