delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/17/19:12:49

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
Message-ID: <428A7ADF.20409@x-ray.at>
Date: Wed, 18 May 2005 01:14:39 +0200
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8b) Gecko/20050217
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: More: Recent increase in size
References: <302d72f2c4cb7d883558c713e211f68b AT NO-ID-FOUND DOT mhonarc DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0505161419510 DOT 6277 AT slinky DOT cs DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.61.0505161419510.6277@slinky.cs.nyu.edu>
X-IsSubscribed: yes

Igor Pechtchanski schrieb:
> On Mon, 16 May 2005, Gary R. Van Sickle wrote:
>>This I do: Those are just mount table entries.  Memory usage won't change
>>regardless of the number or size of files in the directory a Cygwin mount
>>table entry points to.  So there's no consequence there.
> 
> True for the actual disk space usage.  However, if "du -s" is used from
> the root, it will traverse both "/bin" and "/usr/bin", and add up the
> numbers (so you get the size of /bin counted twice, same for /lib).
> 	Igor

Hmm, du -ls is for duplicate traversal on hardlinks.
Without -l (default: opt_count_all=0) it should IMHO be fixed to ignore 
the second /usr/bin

$ ls -id /bin /usr/bin
2533274790648232 /bin  2533274790648232 /usr/bin

Same inode, so it's easy to check.

mkdir -p /tmp/test/test1 /tmp/test/test2
cd /tmp/test
# junction or mount is the same here
junction `cygpath -w /tmp/test/test1` test3
cp ../* test1/
ls -i
   22236523160786906 test1   9288674232096745 test2  22236523160786906 test3
# test2 is empty, test3 hardlinked to test1
$ du
2636    ./test1
0       ./test2
2636    ./test3
5272    .
$ du -l
2636    ./test1
0       ./test2
2636    ./test3
5272    .

=> coreutils bug with du opt_count_all=0 ?

-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
http://phpwiki.org/

--
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/

- Raw text -


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