Filenames and Inode Numbers

Thomas H. Ritter ritter at cs.msstate.edu
Thu Jul 27 06:18:58 AEST 1989


Rick Geymont <GU.GEYMONT%SCIENCE.UTAH.EDU at wasatch.utah.edu> writes:

>The easiest way I have found to remove files with special characters in the
>name is to do the following:
>do an 'ls -i' and get the inode number
>type 'find . -inum # -exec rm {} \;' where # is the inode number.
>
>Works every time...
>

Well almost every time.  Our Suns have the -inum option but
our Unisys 5000 SYSV3.1 does not. The interesting thing is
that the following :

      rm - -name

works and removes the file called "-name" BUT gives an      
an error anyway.

BTW, I can do an ls -i and see the inode information but
what other ways could I remove a file based on inode number?


Tom Ritter
ritter at cs.msstate.edu



More information about the Comp.unix.questions mailing list