Listing names of linked files

Matthew J. Wicks wicks at DCDMJW.FNAL.GOV
Wed Jan 30 01:17:49 AEST 1991


>>Date: 29 January 1991, 11:58:25 MEZ
>>From: Ralf Beyer                (0531) 395-2530      FL17     at DLRVMBS
>>To:   info-iris at brl.mil
>>
>>Listing file links
>>
>>Hi,
>>
>>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 ?
>>
>>Thanks and best regards
>>
>>Ralf Beyer
>>fl17 at dlrvmbs.bitnet
>>

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.


Matt Wicks
Fermi National Accelerator Laboratory
wicks at fnal.fnal.gov
708-840-8083



More information about the Comp.sys.sgi mailing list