Created
May 22, 2009 06:40
-
-
Save prasincs/115980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#this is useful for seeing how far some directory has been used in real time | |
#needs to have dialog utility installed and ncurses | |
while true;do | |
cmd=`du -sh /home3/johndoe` | |
echo $cmd | |
x=` echo $cmd |cut -d ' ' -f 1` | |
#if [ $x == "10G" ]; then | |
# dialog --messagebox "10 gigs" 100 200; | |
# exit; | |
#fi | |
val=${x%"G"} | |
#echo $val | |
echo "$val*100/20" | bc | dialog --gauge 6 70 0 | |
sleep 1; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment