How do I remove corrupted filenames?

UNIX : Removing corrupted filenames

To remove files with filenames that cannot be handled by the rm
command, first find the file in questions' inode number, then use find
to remove it.

ls -li

find . -inum <inum> -mount -exec rm {} \;

Note : The -mount option is important to prevent find from
transversing to other filesystems that may contain files with duplicate
inode numbers.


I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: