mitk

Well-Known Member
May 14, 2003
72
0
156
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?
 

germanos

Member
Oct 11, 2005
6
0
151
Belo Horizonte / Brazil
cPanel Access Level
Root Administrator
Twitter
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/ )

Use:

Code:
 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

Germano