Advertisement
Guest User

disk usage

a guest
May 24th, 2010
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.39 KB | None | 0 0
  1. #!/bin/bash
  2. # Created By: Metalx1000
  3. # This script uses df and AWK to give you a popup every hour to inform you of how much disk space is used.
  4. # Be sure to change the "drive" to the drive you want to monitor.
  5.  
  6. drive="sdg1"
  7.  
  8. while [ 1 ];
  9. do
  10.    clear
  11.    message=`df -h|grep $drive|awk '{print "Drive " $1 " is " $5 " used"}'`
  12.    echo "$message"
  13.    notify-send "$message"
  14.    sleep 1h
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement