Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 1997 10:40:37 +0200 (MET DST)
From:      Zahemszky Gabor <zgabor@CoDe.hu>
To:        freebsd-questions@freebsd.org (FreeBSD questions)
Cc:        rewt@i-Plus.net
Subject:   Re: hard links
Message-ID:  <199705120840.KAA00690@CoDe.hu>
In-Reply-To: <199705120527.BAA04270@Radford.i-Plus.net> from Troy Settle at "May 12, 97 01:29:34 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> >
> >is there any way to determine what files are
> >hard links to s specific file?  it's obvious
> >for softlinks using "ls", but what about
> >hard links?
> >---------------------------------------------------------------------
> ----
> Sure, take a look at this for a short example.
> 
> These two files are hard linked with 4 other files.  How do I know? 
> look at the 2nd column.  See the 6?  Tells me that there's 6 node
> thingies in use for that one file.  (I forget exactly what those
> things are called.  nevertheless, there's 6 directory entries for
> that one file.)

They called the ``number of hard links'' :-)

> -r-xr-x---  6 root  bin  36864 Feb  5 08:00 /usr/bin/chpass
> -r-xr-x---  6 root  bin  36864 Feb  5 08:00 /usr/bin/chsh

Bye, Gabor
--
#!/bin/ksh
Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705120840.KAA00690>