LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 03-12-2008, 12:32 PM   #1
PatrickW
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
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.

Pat
 
Old 03-12-2008, 12:53 PM   #2
PatrickW
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Also

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.

Ad<Thanks>vance

Pat
 
Old 03-12-2008, 01:00 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

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

We can take it from there...
 
Old 03-12-2008, 01:04 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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?
 
Old 03-12-2008, 01:09 PM   #5
thorgal31
LQ Newbie
 
Registered: Mar 2006
Posts: 12

Rep: Reputation: 0
Well, actually you should start by identifying the big folders.

Code:
df
will tell you the disks mount point and occupation.
Code:
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.
Code:
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.
 
Old 05-03-2008, 02:59 PM   #6
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
Smile

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 /.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which folder in linux can be safetly delete to save disk space. TruongAn Linux - General 8 12-19-2005 03:09 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM
Clear out Linux Mandrake disk space? aaronlc Linux - Software 5 02-18-2003 08:09 PM
How to clear up disk space? graystarr Linux - Newbie 3 01-24-2002 09:44 AM


All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration