On Wed, Jul 31, 2002 at 01:54:06PM +0530, Kingsly John wrote:
> +++ Binand Raj S. [2002-07-31 11:44:21]:
> > That "5" is the no. of links to the file, and not part of the UID.
> 
> No! That is only true in case of files... in case of directories it's the
> number of sub directories!

Well, actually, 2 + no. of subdirectories.

Let me explain how the no. of links to a directory = 2 + no. of
subdirectories.

For a file called myfile, when it is created the link count is 1: the
name myfile.  Add a link to it (ln myfile myfileanother) and the link
count increases to 2.

When a directory mydir is created, there are two links already - mydir
and ".". Hence, the link count on an empty directory is 2. When you
add a subdirectory, the subdirectory's ".." links to this directory,
and hence the link count increases.

Binand



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to