1829264 Members
1750 Online
109988 Solutions
New Discussion

/ filesystem almost full

 
kholikt
Super Advisor

/ filesystem almost full

my /filesystem is 140MB...how can I find out what is taking out the space.. I can find any big file under / filesystem
abc
4 REPLIES 4
Bruce Regittko_1
Esteemed Contributor

Re: / filesystem almost full

Hi,

To find files larger than, say, 100000 bytes in the root filesystem, try

find / -xdev -type f -size +100000c | xargs ls -l

The ls command will show you the date the files were last modified.

--Bruce
www.stratech.com/training
Tim Malnati
Honored Contributor

Re: / filesystem almost full

A quick place to look is in the /dev directory. It's not unusual to see a situation where an application attempts to write to a non-existant device but instead starts filling up a file.
mooi-kuan
Advisor

Re: / filesystem almost full

Hi,
To find out which directory is eating up the most space, you can start a search from root using:

cd /
du -s * |sort -nk1

The last line will be the directory/file eating up the biggest space of your hardisk.

cd to that particular directory and repeat the du -s * command

regards
mk
Steven Sim Kok Leong
Honored Contributor

Re: / filesystem almost full

Hi,

You also need to be careful of open files which are "invisible" to du but "visible" to bdf. In this case, your du and bdf results will not tally ie. du will report a smaller usage than bdf.

To identify open files, you can perform an lsof on /. If the open file listed does not exist as a physical file, terminate the process that is holding on to the open file.

This happens especially to logging processes whereby the log file grew too large and was deleted without restarting the process properly, resulting in the process still holding on to the opened log file.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com