Welcome to my website. I am always posting links to photo albums, art, technology and other creations. Everything that you will see on my numerous personal sites is powered by the formVistaTM Website Management Engine.

icon.linkedin.jpgicon.twitter.jpg

  • Deleting a File Using the Inode Number
    01/21/2011 10:18AM
    Sometimes you will accidentally create a file that has special characters in the file name which then prevents you from running commands on it.  In that case, you can resort to accessing the file via it's inode number.

    To do so:

    $ ls -il | more

    In the directory in which the file that you want to examine resides

    This will output a list of files, the first column being the inode number.

    You can then run the following command to delete it, where 123456789 is the inode number:

    $ find . -inum 123456789 -exec rm -i {} \;

    Of course, you can -exec other commands to modify the file as well.

Advanced Search

Categories

Archives