SHARE
TWEET

Untitled

a guest Oct 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Shame people using too much disk.  Good for your /etc/update-motd.d
  3. # Lol what is this the 90s?
  4. PCENT=$(df --output=pcent /home | tr -dc '0-9')
  5.  
  6. if (( $PCENT > 90 )); then
  7.   echo  -e "\033[5mDisk usage has exceeded 90%\033[0m"
  8.   df -h /home
  9. fi
  10.  
  11. du -ks /home/* | sort -n | awk '{ if ($1 > 2000000000) print $2 " is using " $1 / 1000000000 " Tb of disk space" }'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top