delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | ericblake AT comcast DOT net (Eric Blake) |
To: | cyg_win_user <sachin_chat AT rediffmail DOT com>, cygwin AT cygwin DOT com |
Subject: | Re: using nlink value |
Date: | Thu, 09 Mar 2006 13:59:08 +0000 |
Message-Id: | <030920061359.10281.441034AC000289020000282922058891160A050E040D0C079D0A@comcast.net> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
> > here ROOT is a directory which can be or can not be present in all test > directories. so i test if nlink is three (3) and if that ROOT directory is > present to see if the directory is leaf directory. if the ROOT is not > present then i test if nlink is 2 ( for . and ..). > this works fine with linux and solaris. but in cygwin i am not getting the > same value of nlink as i m getting in linux. If you are working on a local drive, use a snapshot (there have been bug fixes on this front to make the link count reliable). But if you are on a shared drive, where nlink is 1, it is because there is no efficient way for cygwin to compute the link count, so you can no longer use the link count as an optimization for finding leaf dirs - you will manually have to stat every file in a directory with a link count of 1 to count the number of subdirectories yourself. -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |