-   Linux - Newbie (
-   -   What to Delete to Clear Disk Space? (

PatrickW 03-12-2008 11:32 AM

What to Delete to Clear Disk Space?
I ran something on a test machine, then ran it on a production machine. It worked good on the test machine....

Bottom line - the disk on the production machine is now full, and I was the last guy to touch it so it's my problem. The disk is big, but my process was the "straw that broke the camel's back" if you know what I mean.

How do I know what's "safe" to delete? What do I look for?

I do have root access if I need it.

Thanks for any advice. I'm really new to Linux.


PatrickW 03-12-2008 11:53 AM

I should add that I don't have physical access to this RHEL4 server. I get to it by running a terminal session through SSH Secure Shell.



anomie 03-12-2008 12:00 PM

First identify the filesystems that are filling up/full: df -h

We can take it from there...

bigrigdriver 03-12-2008 12:04 PM

It would help to know something about the process: what it does; what kind of files does it write.

Setup a test machine and check the output to be sure you get what you want.

Does the process result in a recursive output, such as copying files to a folder, and in the process, copying that folder recursively, resulting is a full disk?

thorgal31 03-12-2008 12:09 PM

Well, actually you should start by identifying the big folders.


will tell you the disks mount point and occupation.

du -sk /any/directory/* | sort -n
will show you the folders size. 'cd'-ing in the biggest ones, you can have the sort for subfolders. It's up to you to know in your data what is deletable or not.
Also, have a look in the temp folders, basically ~/tmp for your home temp directoy, and /tmp for the system temp dir.
Some log files may also get big (/var/log), but maybe logrotate is called periodically on your system to manage log files.

grep -R logrot /etc/cron*
shall tell you if it is called by cron or not.
Browser cache may also get big, fix the max allowed size in your browser preference dialog.

newtovanilla 05-03-2008 01:59 PM

I am newbie to Linux. I think I got it. To clear space on disk:

rm /M$crosoft ME

or, you could do the ever popular:

mv M$crosoft ME /dev/null

This worked for me. I now can put Linux on my /.

All times are GMT -5. The time now is 01:57 PM.