hard links: how to tell with system call under BSD4.3?

Jeremy J Starcher r3jjs at VAX1.CC.UAKRON.EDU
Mon May 13 12:21:53 AEST 1991


In article <1991May10.210452.28889 at ux1.cso.uiuc.edu> phil at ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes:
>
>Check for the link count.  That will tell you how many names the file has.
>For a directory it should always be 2, one for the parent pointing to it and
>one for it's own "." file.

Hm.. not sure if our system is damaged or not, but all of a directories
children also have a link to the parent (..).  

I can tell how many branches there are by looking at the hardlink number
and subracting two.
-- 
--------------------------+---------------------------------------------------
Jeremy J Starcher         !  No programmer programs in LOGO after reaching
r3jjs at vax1.cc.uakron.edu  !  age 14...
r3jjs at akronvm.bitnet      !



More information about the Comp.unix.programmer mailing list