ccel@community-chest.uucp (CCEL) (07/15/89)
I have a strange problem with my unix machine, was wondering if anyone could help me out. I have A/UX for my Mac II (don't laugh, please...) and I discovered one day that I had a directory on my disk that had no . or .. files in it. An ls -al shows that the directory is indeed empty (as in total 0), while an ls in it's parent directory shows that it is a directory. If I do an rm it says it's a directory, rm -r says rm: Directory not empty. I can't mv it to another filename, mv tells me that it has a bad inode. I tried clri to clear the i-node, then next time I ran fsck, fsck kindly restored the i-node for me. fsck also gives me an error each time I run it on the entire file system (it tells me that the directory has no . or ..), but doesn't do anything about it. It's not really very damaging to the file system, it only takes up 48 bytes (for what, I can't imagine), but it gives an error every now and then and annoys me a great deal. If anyone has some clever ideas, I'd like to hear them, just send them by mail so everyone else doesn't have to be annoyed by them. Thanks ... --------------------------------------------------------------------- Randy Tidd rtidd@mitre.arpa ccel@community-chest.UUCP
chris@mimsy.UUCP (Chris Torek) (07/18/89)
In article <59505@linus.UUCP> ccel@community-chest.uucp (CCEL) writes: >... I discovered one day that I had a directory on my disk that had no >. or .. files in it. ... I tried clri to clear the i-node, then next >time I ran fsck, fsck kindly restored the i-node for me. fsck also >gives me an error each time I run it on the entire file system (it >tells me that the directory has no . or ..), but doesn't do anything >about it. [system is A/UX] This indicates a bug in fsck. Certainly the clri+fsck approach should have worked. A manual fsck (that is, without the -p `preen' option) should complain about the directory and offer to either fix it (by adding . and .. entries) or remove it. The other possible way to remove it is to use /etc/unlink (if you have it; if not, compile a one-line C program main() { exit(unlink("/the/bad/directory")); } and run that). In any case, complain to Apple. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris