An inode identifies a file and its attributes including size, owner, permissions, etc. Inode number is unique within a file system, to be specified, we can also call it partition.
Normaly, we use rm to delete files, is there any necessary to remove files by inode? I’d say yes there is!
On the common linux filesystem ext3, it’s allowed to use control characters or characters which are unable to be input on a keyboard or special character such as ^, /, ?, * as a file name.
When using rm, it’s not so convinent to delete these files, and mostly it’s problematic to find out an solution. Using following commands to delete the files are really effective and easy:
Please keep note that the following commands also work on Solaris, FreeBSD and any other Unix-linux-like operation systems:
First find out file inode number with any one of the following command:
stat file-name OR ls -il file-name
If you cannot type the file name, just use * instead of file-name.
Use find command as follows to find and remove a specified file:
find . -inum [inode-number] -exec rm -i {} \;
When prompted for confirmation, press Y to confirm removal of the file.
If you have filename like name “2009/03/21″ then no UNIX/Linux command can delete this file by name. The only way to delete such file is to delete it by inode number.
Linux or UNIX never allows creating filename like 2009/03/21 but if you are using NFS from MAC OS or Windows then it is possible to create such file too.











Very interesting site. Hope it will always be alive!,
Great. Now i can say thank you
Other variant is possible also
Thank you very much
but the remove command is to be
find . -inum [inode number] -exec rm -i {} ;
add a ” at the end on linux
oh we can’t see back-slant here
I’m so sorrry
@goodjob.. Oops, I’m feeling sorry for this issue. Without back-slant, this command is really problematic. I’d pay more attention next time..
Keep up the good work, and post more articles like the one you have posted above.
Howdy just wanted to give you a quick heads up. The text in your post seem to be running off
the screen in Chrome. I’m not sure if this is a format issue or something to do with internet browser compatibility but I thought I’d post to let you know. The design and style look great though! Hope you get the issue solved soon. Many thanks
Oh That’s cool, thank you!
Hello to every one, since I am truly keen of reading
this web site’s post to be updated regularly. It contains pleasant material.