I am writing a small tool in which I require to find per-user File-system-memory-usage.
I have to do some clean up activity if file-system usage is crossing certain threshold value. What is the system call that I can use, so that I could be able to find per user memory usage?
A simplistic approach would be
du -shc /home/*
To sort it:
du -smc /home/* | sort -n
There is also a wellknown Perl script that has the option of mailing disk usage reports per user: durep
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With