Deleting Files with the Null Name
I write this article with fear and trepidation; I've never done this, and clri is strong medicine. However, it's something that needs to be said.
I've seen several reports about files with null names - they evidently arise through some bad interaction between PCs running NFS () and UNIX systems. [I've heard several reports of files with slashes (/
) in their filenames. They came via NFS from Macintoshes. The method below should help with them. -JP] For lots of reasons, it's virtually impossible to delete a null-named file. The following technique has been recommended:
- Use ls -ailF to find out the inode number () of the directory with the null filename.
- Become superuser and dismount the filesystem that contains the directory with the null filename.
- Use the command
clri
filesystem inode
to "clear" the directory's inode, whereinode
is the inode number of the directory that contains the null filename andfilesystem
is the name of the filesystem that contains this directory. - Run fsck, and let it repair the damage.
- ML