Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

site using too much disk space

Discussion in 'General Discussion' started by mitk, Dec 30, 2009.

  1. mitk

    mitk Well-Known Member

    May 14, 2003
    Likes Received:
    Trophy Points:
    I am hosing a site and they are using 40 GB of diskspace, I talked with the owner and he doesn't have a clue on how he is using this much. He thinks there is an error in my reporting system.

    Does anyone have any suggestions on where i can look to check into this? I looked around his directory's but don't see anything jumping out at me.

    Maybe there is an command i can output to a file to make it easier to search? Could there be some massive logs taking up this space?
  2. germanos

    germanos Member

    Oct 11, 2005
    Likes Received:
    Trophy Points:
    Belo Horizonte / Brazil
    cPanel Access Level:
    Root Administrator
    Hi Mitck,

    In root SSH access, the following commands will help to obtain this information:
    I´m found this in : [shell-fu:awk]$

    "This piece of code lists the size of every file and subdirectory of the current directory, much like du -sch ./* except the output is sorted by size, with larger files and directories at the end of the list. Useful to find where all that space goes."

    In home of your customer ( cd /home/username/ )


     du -sk ./* | sort -n | awk 'BEGIN{ pref[1]="K"; pref[2]="M"; pref[3]="G";} { total = total + $1; x = $1; y = 1; while( x > 1024 ) { x = (x + 1023)/1024; y++; } printf("%g%s\t%s\n",int(x*10)/10,pref[y],$2); } END { y = 1; while( total > 1024 ) { total = (total + 1023)/1024; y++; } printf("Total: %g%s\n",int(total*10)/10,pref[y]); } 

    This "piece of code" are very useful for me.

    Best Regards


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice