Certified Supplier


We're an ISO27001:2013 Certified Supplier


Files with special characters in them can cause no end of problems. Here’s two ways to deal with them.

Consider the following file:

Using rm in the usual way will give an error, although it also gives a hint as to how the file may be removed:

Preceding the filename with ./ works in this case, but there are other cases where that may not be so easy. Here we have a filename containing Unicode characters:

If you’re not easily able to generate Unicode characters from your keyboard (or you can’t remember how to), removing this file may be challenging, but there is another way.

We can manipulate the file using its inode number. Every file in the filesystem has an inode, which is the link between the file’s entry in the directory and the data blocks which hold its contents. Every inode has a unique number within the filesystem.

ls has an option, -i,  to display the file’s inode number

Now we can use the find command to remove the file:

Could this Linux Tip be improved?

Let us know in the comments below.

Leave a Reply

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