www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/04/11/05:15:58

Date: Thu, 11 Apr 1996 12:08:47 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp-workers AT delorie DOT com
Subject: Numbers of links for directories
Message-Id: <Pine.SUN.3.91.960411120247.27524V-100000@is>
Mime-Version: 1.0

Under Unix, the number of links for a directory is equal to the number of 
its subdirectories plus 2.  Our `stat' always reports 1 in this field.  
If people think that it's worthwhile to add such a feature, it is very 
easy to do: `stat' already finds all the subdirectories to report 
non-zero size for a directory.  So far I only saw this used by GNU 
Findutils during a recursive descent, to know there is no more 
subdirectories left, and the gain from using this didn't seem to be a 
large one, but since compatibility is the name of the game here...

Let me know what you think.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019