On Thu, 13 Nov 2003, Challison wrote:
> Ok....I know that I can do a "ls -i <filename>" to get its inode number.
> If I know a inode number, is there a command that will list the
> /dir/filenames that are hardlinked to that inode?
find / -inum 12345 -ls
This is also extremely useful when on a Unix with sucky terminal emulation
and the DBA manages to create a file with ^H's, ^C's, ^Z's and all kinds
of escape characters in the filename, and you're using the Bourne or Korn
shell which suck at filename completion. And you need to delete the file.
ls -li to get the inode, then find . -inum 12345 -exec rm -rf {} \;
ray
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ray DeJean http://www.r-a-y.org
Systems Engineer Southeastern Louisiana University
IBM Certified Specialist AIX Administration, AIX Support
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=