[KLUG Members] Directory Size

Dirk H Bartley members@kalamazoolinux.org
08 Dec 2003 10:31:45 -0500


On Mon, 2003-12-08 at 09:55, Jamie McCarthy wrote:
> bartleyd2@chartermi.net (Dirk H Bartley) writes:
> 
> > Someone has already told me that it segfaults on debian
> > systems.  I'm looking for a debian system to test it on.  Any
> > volunteers?
> > 
> > ftp://ftp.kalamazoolinux.org/pub/projects/dbartley/dirsum.tgz
> 
> On Debian (at least on the unstable branch I'm using), it works on
> some directories, not on others.
> 
> 
> daisy:/usr/local/src/dirsum# cat /etc/issue
> Debian GNU/Linux testing/unstable \n \l
> 
> daisy:/usr/local/src/dirsum# uname -a
> Linux daisy 2.4.21.20030916 #1 Tue Sep 16 15:54:55 EDT 2003 i686 GNU/Linux
> 
> daisy:/usr/local/src/dirsum# make
> g++ -c -g -Wall BitFlagg.cpp -o BitFlagg.o
> g++ -c -g -Wall CountFilesSumBytes.cpp -o CountFilesSumBytes.o
> g++ -c -g -Wall FilesInDir.cpp -o FilesInDir.o
> g++ -c -g -Wall ReturnSum.cpp -o ReturnSum.o
> g++ -c -g -Wall ReturnValues.cpp -o ReturnValues.o
> g++ -c -g -Wall SubDir.cpp -o SubDir.o
> g++ -c -g -Wall SubDirectory.cpp -o SubDirectory.o
> g++ -c -g -Wall main.cpp -o main.o
> g++ -g -Wall -o dirsum BitFlagg.o CountFilesSumBytes.o FilesInDir.o ReturnSum.o ReturnValues.o SubDir.o SubDirectory.o main.o

Woo hoo, it compiled.

> 
> daisy:/usr/local/src/dirsum# g++ --version
> g++ (GCC) 3.3.2 (Debian)
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> daisy:/usr/local/src/dirsum# ./dirsum /home/jamie/dl      
> /home/jamie/dl has 4687060 Bytes in 6 Files, with 6 Subdirectories
> which is  0.08 percent of total
> 
>    Subdirs   This Directory         1 Deeper         2 - 45 Deeper          Totals
>       Name   Bytes   Files   Dirs   Bytes   Files    Dirs   Bytes   Files   Files   Bytes    %
>       rush    5.5T     611                                                    611    5.5T 96.85
>         hl  177.7G    7029                                                   7029  177.7G  3.04
> memtest86-  806.5M      54                                                     54  806.5M  0.01
>  Pound-1.5  454.3M      17                                                     17  454.3M  0.01
>      pound  412.6M      16                                                     16  412.6M  0.01
> qce-ga-0.4  195.3M      17      1    6.2M       4                              21  201.5M  0.00
>     Totals    5.7T    7744      1    6.2M       4                            7754    5.7T
> daisy:/usr/local/src/dirsum# ./dirsum /home/jamie/dl/pound
> Segmentation fault

I can get it to segfault on a directory with no subdirs as well.  The
segfault is fixed, I hope.

ftp://ftp.kalamazoolinux.org/pub/projects/dbartley/dirsum2.tgz


Dirk


>   Jamie McCarthy
>  http://mccarthy.vg/
>   jamie@mccarthy.vg
> _______________________________________________
> Members mailing list
> Members@kalamazoolinux.org
>