Skip to content

Instantly share code, notes, and snippets.

@jbonhag
Created July 1, 2014 14:08
Show Gist options
  • Save jbonhag/a4e813758000858bdcb3 to your computer and use it in GitHub Desktop.
Save jbonhag/a4e813758000858bdcb3 to your computer and use it in GitHub Desktop.
Remove file by an inode number
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