Deleting A File By It's Inode Value


#1

It is possible to delete a file by the it’s inode value.

To test this, first create a file:

$ cat > '\n\n\n\n\n\n\n' 
type some text 
^D

To list the inode and display the characters.

$ ls -libt *

To remove by inode. Note the “–” option. This will keep any special characters in the file from being interpreted at “rm” options.

$ find . -inum -exec rm -- '{}' \;

Or to check contents

$ find . -inum -exec cat '{}' \;

Reference: http://www.faqs.org/ftp/usenet/news.answers/unix-faq/faq/part2