Each sequence of commands that you repeat a couple of times can be scripted. Not only configuring can be automated. Actually reporting is a more thankful target for automating.
For instance:
Code:
#!/bin/sh
HOMES=" \
/home/j65nko
/home/john
/home/robert
/home/packages
"
CMD="du -ks"
# -k : blocks of 1024 bytes
# -s : grand total only (no individial files)
echo "Home directory usage on $(uname -n)"
date
echo "==============================================="
${CMD} ${HOMES} | awk '{ total += $1 ;
printf "%-30s : %10u\n", $2, $1 ;
} END { printf "%+30s : %10u\n", "TOTAL", total }'
A sample run
Code:
$ sudo home-usage
Home directory usage on hercules.utp.xnet
Wed Dec 24 02:30:50 CET 2008
===============================================
/home/j65nko : 5829316
/home/john : 2686
/home/robert : 20
/home/packages : 262100
TOTAL : 6094122