I'm trying to delete a supposedly empty directory on a ReiserFS filesystem, but I can't because
rm keeps complaining that the directory isn't empty.
$ rm -rf thedirectory rm: cannot remove `thedirectory': Directory not empty $ ls -a thedirectory . ..
The problem is, everything I do to try to determine what actually is in the directory seems to show that there are three files with no names. For example:
$ cd thedirectory $ ls ls: cannot access : No such file or directory ls: cannot access : No such file or directory ls: cannot access : No such file or directory $ find . . ./ ./ ./ $ ls -N | cat -A $ $ $
Since I can't get filenames, I can't run
stat or anything useful on these mystery files. A
stat on the directory itself yields seemingly normal results:
$ stat . File: `.' Size: 192 Blocks: 0 IO Block: 4096 directory Device: 807h/2055d Inode: 825484 Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 1000/ diazona) Gid: ( 1000/ diazona) Access: 2012-01-27 16:32:45.000000000 -0500 Modify: 2012-01-27 16:31:58.000000000 -0500 Change: 2012-01-27 16:31:58.000000000 -0500
I suppose some kind of filesystem corruption is involved, which probably means I have to shut down, boot from a live USB drive, and try my luck with
reiserfsck. But is there any easier way to deal with this?