1834628 Members
2923 Online
110069 Solutions
New Discussion

root f.s is filling up

 
radi_1
Frequent Advisor

root f.s is filling up

Hi,
the root file system is filling up by 5% every day.I checked fore large files using find cm but could not find any,I used the syntax:
#find / -xdev -size +10000.. up to 7 zeros.

if the syntax is wrong please inform me.
Obviously some file is getting big all the time,how can I find it?
Thanks
never take simple maters for granted
10 REPLIES 10
MarkSyder
Honored Contributor

Re: root f.s is filling up

cd /
ll|sort -k5,5nr|pg

This will sort the files in size order, largest first.

If the file that's growing isn't one of the top ones in that list, try:

ll -t|head

This will sort the files by time order, most recent first. By default, this will show 10 files, but you can change that if you want.

It's likely that the file that's growing should be in a different filesystem.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Steve Steel
Honored Contributor

Re: root f.s is filling up

Hi


Problem could be a lot of files getting a bit bigger like the system logs and you will never see it.


ll -tra /
will show what changes and then look there

If the last articles are directories then
ll -tra /dir to check that one


Or touch a reference file and then use it in


find / -type f -xdef -newer /touchedfile|xargs ll -d

Then you will have a list of all files modified since you made the file

Every 24 hours you could run this and then touch the file agaian

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Eric Antunes
Honored Contributor

Re: root f.s is filling up

Hi,

It may be felling with many but no such large files...

But you can simply try this (why using -xdev ?):

find / -size +10000

Each and every day is a good day to learn.
MarkSyder
Honored Contributor

Re: root f.s is filling up

I inadvertently ignored the possibility that the files might be in a directory which is hanging off root. Try:

du -k|sort -k1,1nr|pg

This will tell you which directories are taking up the most space. Make sure you ignore those which are in separate filesystems.

Mark
The triumph of evil requires only that good men do nothing
Eric Antunes
Honored Contributor

Re: root f.s is filling up

With ordered listing:

find / -size +10000 -exec ll -ct {} \;
Each and every day is a good day to learn.
Franky_1
Respected Contributor

Re: root f.s is filling up

Hi,

what about writing the contents of the root FS to a file, then do the same next day and compare them with diff ?
So you'll see exactly what has changed
For example

ls -lR / > test1
ls -lR / > test2
diff test1 test2


Regards

Franky
Don't worry be happy
Borislav Perkov
Respected Contributor

Re: root f.s is filling up

Hi,
You could try with SAM Routine task > Selective File Removal. There you could place your search criteria.

Beginning Search Path: /
Cross Mount Points: No
Minimum Size (bytes): 10000
Time Since Last Modification (days): 1 or as you want.

Regards,
Borislav
Kent Ostby
Honored Contributor

Re: root f.s is filling up

So I would use a size that isn't quite that big:

find / -xdev -size +100000

du has a similar construct to xdev which is -x so:

du -x | sort -nr | more

And of course the ll listed above to check you're current directory.

A common scenario is to find a file in /dev/rmt where someone mistyped the tape device file name and created a huge file down there.

Non device files in /dev:

find /dev -exec ll {} \; | grep "^\-"

Best regards,

Kent M. Ostby

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Edgar Zapata
Esteemed Contributor

Re: root f.s is filling up

Hi,
how about combining with any of these switches?
find -mtime n
find -atime n
this may tell recent changed files.
rgds.
Edgar Zapata
Esteemed Contributor

Re: root f.s is filling up

Also,
you might as well create a dummy file yourself of whatever size you want to preserve for the / file systm.
so you can delete it when needed.
just to prevent a major problem.
rgds.