-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At some point hitherto, Jerry Feldman hath spake thusly: > think the the directory itself somehow became corrupted. I can > write a program that uses stat that can call unlink(2). What I need > to do is a force delete of the directory itself without trying to > delete the contents. Hrmmm... I seem to recall reading somewhere that this can't be done on Linux. I believe some (mostly older) Unix variants allowed this, but the Linux FS developers felt that allowing this sort of thing was a Bad Thing(tm) hence it's only possible at the kernel level. The reasoning, IIRC, is that allowing (root only) users to do this is too prone to FS corruption. I'm not positive that all this is true; OTOH the rmdir syscall does not allow the deletion of directories that aren't empty, and does not provide a way to force the issue. I'm not aware of any other means of removing a directory on Linux. IIRC, some variants allowed unlink() to remove directories; Linux's unlink() does not (it returns EPERM in such a case). I think what you want is impossible. - -- Derek Martin ddm@pizzashack.org - --------------------------------------------- I prefer mail encrypted with PGP/GPG! GnuPG Key ID: 0x81CFE75D Retrieve my public key at http://pgp.mit.edu Learn more about it at http://www.gnupg.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8+UOqdjdlQoHP510RAm8FAKC8T6siDiLHtIaGtH6ExY6OC+N11ACcDdcw dSPFAENAEDQ5OmWZrro0WCY= =Z5sh -----END PGP SIGNATURE-----