diskwatch.sh
can someone please help me i need this for my school.
How can i calculate how many users have home directories over a specific size and flag those users in the report, or list all files in /tmp that are over 60 days old
here's the script the base script
#!/bin/bash
# diskwatch.sh
# script to create/mail disk reports
echo -e "From: Disk Usage Monitor <devnull@localhost>
Subject: Disk usage on / on `date`
To: <root@localhost>
FILESYSTEM USAGE:
`/bin/df`
USAGE IN /home:
`/bin/du -h -s /home/*`
USAGE IN /tmp:
`/bin/du -h -s /tmp`
" | /usr/sbin/mail root
i dont know how to upgrade it to calculate how many users have home directories over a specific size and flag those users in the report, or list all files in /tmp that are over 60 days old
Thanks in advance
|