Linux Things

How to get rid of files with bad names

I found this useful on a few occasions.

//First, output all files with inode numbers.
$ ls –il

//To remove a directory with a bad name, 
//put the inode number of the directory you 
//want to remove in this script.
$ find . -inum 5833091 -exec rm -rf {} \;

//To remove a file with a bad name, put the 
//inode number of the file you want to remove 
//in this script.
$ find . -inum 5833091 -exec rm {} \;

More to come later ;:~)