Created
July 1, 2014 14:08
-
-
Save jbonhag/a4e813758000858bdcb3 to your computer and use it in GitHub Desktop.
Remove file by an inode number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The -i option to ls displays the index number (inode) of each file: | |
ls -li | |
Use find command as follows to delete the file if the file has inode number 4063242: | |
$ find . -inum 4063242 -delete | |
OR | |
$ find . -inum 4063242 -exec rm -i {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment