Deleting files with special characters

You can delete a file with strange characters (especially hidden characters) by it’s inode number.

To find the inode number of a file, list the directory with the -i option:

ram# ls -i
2064227 test

2064227 is the inode number of the file ‘test’.

Use the find command to delete the file by it’s inode number:

find . -inum 2064227 -exec rm {} ;

3 thoughts on “Deleting files with special characters”

Leave a Reply

Your email address will not be published. Required fields are marked *