1755140 Members
3142 Online
108830 Solutions
New Discussion юеВ

Help Needed

 
SOLVED
Go to solution
Hunki
Super Advisor

Help Needed

We have this root filesystem which is 95% full and needs to be trimmed down. I am not the root owner but need to find out which files are eating up the space avoiding the other filesystems ( diff mount points like /var etc) which are mounted on there own filesystems. How to achieve this. "du -sk * |sort +nr " is taking a lot of time and trying to consider other fs also . One more thing if I am not root then can find out the space available in a particular dg ( disk group ) , specially the rootdg.

thanks,
hunki
5 REPLIES 5
Geoff Wild
Honored Contributor

Re: Help Needed

Look for things in /etc

You really need root - as the average user won't be able to transverse all file systems.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Coolmar
Esteemed Contributor
Solution

Re: Help Needed

I got this excellent script (off here I think) that tells you how many MB/GB each directory is taking up. It gives the top 20 in a directory...of course, you can modify it to give you the top 30, 40...100 whatever you want. The script is an attachment.

The syntax is

./top20.sh /filesystem
Jim Mallett
Honored Contributor

Re: Help Needed

You can exclude the other file systems from your du by changing the s to x:
# du -xk /

Even better, sort the output:
# du -xk / | sort -k n1

It will still take some poking around, but this will help you narrow your search.

You may want to do a search for core files:
# find / -type f -name core -xdev
(the -xdev should keep you from wandering outside the root FS)

Hope this helps....
Jim
Hindsight is 20/20
George Liu_4
Trusted Contributor

Re: Help Needed

Sincerely thought you don't do it. If you don't have root permission, you shouldn't do it.
Hunki
Super Advisor

Re: Help Needed

Thanks Coolmar / Jim. 10 points each.