Sign in with
Sign up | Sign in
Your question
Solved

If more than xxGB

Tags:
  • bigger than
  • Debian
  • Deal
Last response: in Linux/Free BSD
Share
January 20, 2014 5:01:18 AM

Hello I'm currently working with debian.
So, heres the deal.
If someones folder is bigger than 50GB is should alert the administrator.
It check all the folders in /home/ each week, and put the output in output.txt.
How do make a .sh to look through the output.txt and see if something is bigger than 50GB.
Here I used cat on output.txt so you can see how it's setup.


Thanks in advance!

More about : xxgb

Best solution

January 20, 2014 9:52:30 AM

why not just use disk quota?
https://wiki.archlinux.org/index.php/Disk_Quota
http://mahidulsblog.blogspot.com/2013/05/how-to-configu...

  1. du -h /home | awk '$1 ~ /[0-9]*G/ {print}' | awk '{ if ( $1 > 50 ) print }'

Share
!