LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to clear up disk space? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-clear-up-disk-space-12531/)

graystarr 01-23-2002 08:02 PM

How to clear up disk space?
 
Not sure how to clear up disk space in linux. I am receiving disk space low messages and would like to fix this issue. I have it installed on a 10 gig hd and only running apache on it and my home directory for apache is on another hd (60gb). Any help would be great. I know how in windoze but really need to get this fixed so my website does not crash

acid_kewpie 01-24-2002 05:29 AM

well it all depends where the space has gone, maybe you've been generating vast log files without knowing. maybe ther's a few 100meg cores lying arond.. prolly not.
use 'df' to see how much space is around on each partition, and also you might want to look at 'du' to see exactly where the space is going. i generally do

'du -h | grep M | less' just to cut out all the tiny directories that don't matter.

theFuzzyOne 01-24-2002 07:54 AM

core files: these are memory dumps and such that you probably don't need... try
find / -type f -name core -type f -xdev -exec rm -f {} \;

and you can find the biggest files in a directory with this:
ls -l | sort +4n
or
ls -lR | sort +4n
for recursive search.

also, i find that ' du -h --max-depth=1 ' is useful to find which directories are the biggest and ' df -hTl ' to list your partitions and sizes

what linux distro and version are u using? you can go through your installed packages and uninstall what you don't need

neo77777 01-24-2002 08:44 AM

And in a case of core files, if you are using c or korn shell, run the limit command to set the core files to be less or equal the size you specify, also take a look at your logs, some of them are just rediculously huge and just sit there for nothing.


All times are GMT -5. The time now is 04:52 AM.