Date: Wed, 8 Oct 2008 12:18:25 +0800 From: lhmwzy <lhmwzy@gmail.com> To: "Andrew Snow" <andrew@modulus.org> Cc: freebsd-stable@freebsd.org Subject: Re: zfs quota question Message-ID: <78fb9d960810072118k47a64097yaa486ef5179efb1@mail.gmail.com> In-Reply-To: <48EB5ADD.2090900@modulus.org> References: <E1KnA2b-0007ls-8u@dilbert.ticketswitch.com> <200810071314.45922.max@love2party.net> <48EB5ADD.2090900@modulus.org>
next in thread | previous in thread | raw e-mail | index | archive | help
The fllow is better? #!/bin/sh find $1 -type f -exec ls -lh {} \; | awk '{j += $5} END {print j"M"}' 2008/10/7 Andrew Snow <andrew@modulus.org>: >> I love ZFS, but I suddenly found out last night that I >> have lost the ability tto do a 'du' on a directory to work out if it will >> fit onto a CD or not :-) > > I have created a shell script, /usr/local/bin/dirsize : > > > #!/bin/sh > find $1 -type f -ls | awk '{j += $7} END {print j}' > > > > Usage: dirsize <path> > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78fb9d960810072118k47a64097yaa486ef5179efb1>