The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Linux command to help find disk usage culprit?

Discussion in 'General Discussion' started by sneader, Apr 18, 2009.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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
     
  2. hzJohn

    hzJohn Member

    Joined:
    Mar 16, 2009
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    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.
     
    sneader likes this.
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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
     
Loading...

Share This Page