[Dirvish] Utility to show incremental usage per image within a vault

Richard Geoffrion dirvish at rain4us.net
Fri May 5 20:50:39 UTC 2006


-----------------------
#!/bin/bash
FILE=/tmp/imagesize
echo > $FILE
for INSTANCE in * ; do
echo "$INSTANCE - `zcat $INSTANCE/log.gz | grep \"Total bytes written:\" 
| cut  -d : -f2`"
done

#The next line is optional..and requires an MTA be available to send the 
mail.
smtp=smtp cat $FILE | mail -s "File sizes for image `pwd`" 
adminuser at example.com
rm $FILE
-----------------------

Cleaned it up JUST a tad.. :)  That's what happens when you modify an 
existing script for another purpose. :)



More information about the Dirvish mailing list