commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This one-liner is for cron jobs that need to provide some basic information about a filesystem and the time it takes to complete the operation. You can swap out the di command for df or du if that's your thing. The |& redirections the stderr and stdout to the mail command.
How to configure the variables.
FSCKDEV=`grep $TOFSCK /proc/mounts | cut -f1 -d" "`
MAILSUB="weekly file system check $TOFSCK "
There are 9 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.