Linux command to help find disk usage culprit?

sneader

Well-Known Member
Aug 21, 2003
1,195
65
178
La Crosse, WI
cPanel Access Level
Root Administrator
I am getting alerts that /usr is at 81%, and I'm trying to find the right command to find the "culprits". I've read up on "du" and "df", but they don't seem to give me what I want.... which is to see a list of disk usage for each subdirectory in /usr.... then I can go into the high usage directories and perform this same query, until I find out what is going on.

I am surely missing something obvious?

TIA!

- Scott
 

hzJohn

Member
Mar 16, 2009
9
1
53
Enter the /usr partition and type the command du -sch *

# cd /usr/
# du -sch *

By this way you can find out the disk usage of individual directories.
 
  • Like
Reactions: sneader

sneader

Well-Known Member
Aug 21, 2003
1,195
65
178
La Crosse, WI
cPanel Access Level
Root Administrator
Thank you hzJohn! That is exactly what I was looking for! It helped me find a log that was 1.6GB and not being properly rotated, in /usr/local/cpanel/logs, called incoming_http_requests.log. All the rest of the logs in that directory were being rotated properly except that one!

- Scott