[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: minor bug in "du" size calculator in build_all.sh



On Mon, May 29, 2000 at 05:05:35PM +0100, Philip Hands wrote:
> 
> BTW, check this out:
> 
> open:~$ du -sDm ~ftp/debian/dists/potato/main/disks-i386/current
> 100	/home/ftp/debian/dists/potato/main/disks-i386/current
> open:~$ du -lsDm ~ftp/debian/dists/potato/main/disks-i386/current
> 101	/home/ftp/debian/dists/potato/main/disks-i386/current
> open:~$ 
> 
> Where's the extra 1MB coming from?  It's not simply the size of the
> things pointed at by symlinks, because that would be 7.5Mb:

Because some files were hard-linked?  No one seems to have mentioned that
"-l" is not the right switch to get du to follow symlinks:

$ du --help
[...]
  -l, --count-links     count sizes many times if hard linked
  -L, --dereference     dereference all symbolic links
[...]

-- 
Charles Briscoe-Smith             <URL:http://www.debian.org/%7Ecpbs/>
PGP2:  1024/B35EE811  74 68 AB 2E 1C 60 22 94  B8 21 2D 01 DE 66 13 E2
"You think that's air you're breathing now?" -- Morpheus, "The Matrix"



Reply to: