Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # for file sizes
  4. # 19456000 = 19GB
  5.  
  6. # Random find on hard drive might not work
  7.  
  8. SPACE= df -P . | tail -1 | awk 'CHECK=$4';
  9.  
  10. S=df -P $PWD | awk 'NR==2{print $4}'
  11.  
  12. echo $S;
  13.  
  14. #echo $SPACE;
  15. #SPACE2='100';
  16.  
  17. if [ $SPACE -lt '19372299' ]; then
  18. echo '';
  19. echo 'We are running out of space under ';
  20. else
  21. echo 'we all good on space';
  22. fi
  23.  
  24. exit 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement