zfs quota question

lhmwzy lhmwzy at gmail.com
Wed Oct 8 04:18:28 UTC 2008


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 at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>


More information about the freebsd-stable mailing list