Can not delete files containing special characters in the file name

I just found out how to delete such files witch special characters:

  1. cd <directory with that file>

  2. ls -ali

  3. At the very left of the directory listing you see the ID of the inode of each file.

  4. Delete your file via inode ID:

    find . -inum <inode ID of your file> -exec rm -i {} \;

This worked fine for my issue. Hope this helps!


You could use bash wildcards with

 rm b?r.jpg

where ? stands for exactly one character. An alternative (if both file names were the same length) would be

rm b[!e]r.jpg

where [!e] means any character except "e".