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

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



On 2000-05-27 at 13:33 -0400, Ben Collins wrote:

> On Sat, May 27, 2000 at 09:54:02AM +0100, Philip Hands wrote:
> > Hi,
> > 
> > du doesn't follow symbolic links, so the size of "current" is reported
> > as 0
> > 
> > This will work:
> > 
> >   disks=`cd ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current ;\ 
> >          du -sm | cut -f1'`
> 
> Umm, it should work since I used .../current/. which completely ignores
> the symlink. I used it to build quite a few CD's, are you sure something
> else isn't wrong?

I tested this on the local mirror (which is actually an i386 machine
running Potato), and Phil is right.  If you want du to follow symlinks in
the tree, you need the '-l' switch; if you want du to follow symlinks
specified on the command line as their real locations, you need the '-D'
switch.  So I got this to work very easily just by using

	du -lsDm ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/

This is really not a big deal as long as you get all the switches right.

-- Mike




Reply to: