Mark M. Hoffman on 10 Nov 2004 01:07:02 -0000


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

Re: [PLUG] CD image packer


Hi Jason:

* Jason M. Lenthe <lenthe@comcast.net> [2004-11-09 19:26:44 -0500]:
> I calculated the average file size of my home directory using a
> handy-dandy CLI program that I created called dstat (short for
> Descriptive Statistics) which can be found at
> http://home.comcast.net/~lenthe/dstat.cc.  With dstat the following
> command did the trick: ls -alR ~ | egrep -v '^d' | awk '{print $5;}' |
> dstat.  Someone should let me know if there's an easier way to calculate
> the average size of a bunch of files.

Fun question; here's a brute-force-ish one-liner:

	cd $DIR && echo "`du -sb . | cut -f1` / `find . | wc -l`" | bc -l

I'm sure someone else can do better...

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug