Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <428B3B5C.60306@byu.net> Date: Wed, 18 May 2005 06:55:56 -0600 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Reini Urban CC: cygwin AT cygwin DOT com Subject: Re: More: Recent increase in size References: <302d72f2c4cb7d883558c713e211f68b AT NO-ID-FOUND DOT mhonarc DOT org> <428A7ADF DOT 20409 AT x-ray DOT at> In-Reply-To: <428A7ADF.20409@x-ray.at> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Reini Urban on 5/17/2005 5:14 PM: > 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 ? > It took me a while to reproduce this. $ cd /tmp/ $ mkdir example $ cd example $ echo hello > file1 $ ln file1 file2 $ du 1 . $ du -l # So far, so good - linked files counted just once 2 . $ mkdir dir1 $ mkdir dir2 $ echo goodbye > dir1/file $ ln dir{1,2}/file $ du 1 ./dir1 0 ./dir2 2 . $ du -l # Still good, over subdirectories 1 ./dir1 1 ./dir2 4 . $ mount `cygpath -w /tmp/example/dir1` /tmp/example/dir3 $ ls -iRF .: 14952513712823677584 dir1/ 2251799813894795 file1 28147497671275154 dir2/ 2251799813894795 file2 14952513712823677584 dir3/ ./dir1: 17343925114957410972 file ./dir2: 17343925114957410972 file ./dir3: 17343925114957410972 file $ du # Good even with hard-linked (well, mounted) directories... 1 ./dir1 0 ./dir2 0 ./dir3 2 . $ du -l # ...where file was also linked outside linked directories 1 ./dir1 1 ./dir2 1 ./dir3 5 . $ echo testing > dir3/file3 $ ls -iRF .: 14952513712823677584 dir1/ 2251799813894795 file1 28147497671275154 dir2/ 2251799813894795 file2 14952513712823677584 dir3/ ./dir1: 17343925114957410972 file 1970324837184162 file3 ./dir2: 17343925114957410972 file ./dir3: 17343925114957410972 file 1970324837184162 file3 $ du # Whoops - file3 is showing up twice 2 ./dir1 0 ./dir2 1 ./dir3 4 . $ du -l 2 ./dir1 1 ./dir2 2 ./dir3 7 . I'll have to investigate further, but it is probably an upstream bug. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCiztc84KuGfSFAYARAmNuAJ9o5n7PLVW6oGIMd9JQ05zb6XmGvgCgyMRg yJLYHD4ExhCI+Y0M39neEJA= =4JE4 -----END PGP SIGNATURE----- -- 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/