Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Shame people using too much disk. Good for your /etc/update-motd.d
- # Lol what is this the 90s?
- PCENT=$(df --output=pcent /home | tr -dc '0-9')
- if (( $PCENT > 90 )); then
- echo -e "\033[5mDisk usage has exceeded 90%\033[0m"
- df -h /home
- fi
- du -ks /home/* | sort -n | awk '{ if ($1 > 2000000000) print $2 " is using " $1 / 1000000000 " Tb of disk space" }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement