rm -r gives up before going deeper upon encountering hindrances
From:
Dan Jacobson
Subject:
rm -r gives up before going deeper upon encountering hindrances
Date:
Wed, 05 May 2004 06:09:14 +0800
Here I though rm would go in and still remove all it could.
But it turns out that it gives up before going deeper upon encountering
hindrances.
$ id
uid=1000(jidanni) gid=1000(jidanni) groups=1000(jidanni)
$ ls -la cds
drwxrwxrwx 3 root staff 4096 2003-12-06 10:49 .
drwxrwsr-x 4 root staff 4096 2003-12-06 10:29 ..
-r--r--r-- 1 jidanni jidanni 510021216 2003-12-06 10:15 data.bin
$ /bin/rm -rf *
/bin/rm: cannot remove `cds': Permission denied
$ /bin/rm -rf cds
/bin/rm: cannot remove `cds': Permission denied
$ ls -l cds/data.bin
-r--r--r-- 1 jidanni jidanni 510021216 2003-12-06 10:15 cds/data.bin
$ /bin/rm -rf cds/data.bin
The file is now finally gone.
OK, next time I'll use find cds -type f|xargs rm, etc.
Anyway, the docs don't seem to document the above case.