Linux 101 : Troubleshooting the filesystem - deleting files with long cryptic names -

Sometimes programs wrongly create files with weird, long names that we have trouble deleting.

To be able to get rid of this file, we could use its inode instead of its filename.

We could display the inode of our file using the following command - in the directory where the file is located -:

We can see from the above  output that the file has the inode number "348".

We could also check the inode of the file using the "stat" command as follows:

To delete the above file using its inode, we could use the below command:

The "find" command looks for the file with the inode number "348" in the "." current directory, and the "exec" command runs the "rm" command on the output of the "find" command.


Leave as a comment: