Listing names of linked files

Brendan Eich brendan at illyria.wpd.sgi.com
Wed Jan 30 06:58:37 AEST 1991


In article <9101291417.AA15961 at dcdmjw.fnal.gov>, wicks at DCDMJW.FNAL.GOV ("Matthew J. Wicks") writes:
> >>Date: 29 January 1991, 11:58:25 MEZ
> >>From: Ralf Beyer                (0531) 395-2530      FL17     at DLRVMBS
> >>To:   info-iris at brl.mil
> >>
> >>does anyone have an idea how to list the (path)names of the files a
> >>file is linked to ? ls -l gives the number of links but how can the
> >>associated names be retrieved ?
> 
> A combination of ls and /etc/ncheck will provide this information. ls is
> required to get the inode number of the file (using the -i option) and
> then ncheck will return the path names for this inode. For example, to
> determine all the path names of inode 1971 in the root file system, the
> following command could be used:
> 
> 	/etc/ncheck -i 1971 /dev/root
> 
> Please note, you will most likely need to be root for this to work, as you
> need to be able to have read permission of the special device file (/dev/root)
> for this to work.

There's always 'find -inum 1971 -print' if you don't need to look in any
directories to which you lack search permission.  It's usually a little
slower than ncheck.

/be



More information about the Comp.sys.sgi mailing list