LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-17-2002, 02:38 PM   #1
Passive
Member
 
Registered: Mar 2002
Posts: 51

Rep: Reputation: 15
Arrow How to free up space? rm doesn't do it.


Hi all,
Is there any way to force the system to free up the space achieved by rming something? I understood it would be done automatically, but as it is, people can't print.

On another note, I'm running a pretty standard install of mandrake 8.1, and I would like to know what I can delete. I probably won't be recompiling much, and when I do, I'll probably want to download the latest version anyway, so maybe there's a directory or two full of src that I can delete?
 
Old 04-17-2002, 02:49 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
maybe your /tmp directory is a start..
clean out home directories with old files not needed...
 
Old 04-17-2002, 02:49 PM   #3
jatimon
Member
 
Registered: Apr 2002
Posts: 33

Rep: Reputation: 15
rm doesn't do it??

rm is used to delete files.

it will free up space. the only time that it won't is if you happen to rm a file that has an open file descriptor.

for example /var/log/httpd.log (or what ever) is being written to and held open by the httpd daemon. If you happen to delete that file, it will appear to have been deleted, but in actual fact it is not. If you want to understand why, read about inodes on www.linuxdoc.org.

to recover from this type of problem, you need to kill the process that had the file open. If you do not know that process, try using lsof, it may be helpful. if nothing helps, reboot and everything will be peachy, the file will have been deleted.


Now, on to how to clean up space. you can use du -sk * from the / directory and this will display the usage of each directory under /. this will just tell you which directories are consuming large amounts. Then it is your responsibility to judiciously decide what can be deleted/compress/moved to make new space.

Also you should consider what partition is full. You say your users cannot print, where is the print spool directory mounted. IIRC /var/spool/lp .... is this mounted on / or /var ?

cd to the spool directory type df -k . and that will tell you its mount point. this is likely the filesystem that needs to be cleaned up. Then just wlk through with the du -sk and ls -l commands and find stuff you can whack.

you might want to consider /var/log as a place to start too.

HTH
 
Old 04-17-2002, 02:57 PM   #4
Passive
Member
 
Registered: Mar 2002
Posts: 51

Original Poster
Rep: Reputation: 15
Arrow

Thanks for the quick responses.
I've got two partitions. One for user data storage, one for everything else.
The everything else partition is about 8 gigs.
print jobs go to /var/spool/ I believe.
when I use df to check free space, it says that not all the blocks are used, but that the use% is at 100.
Much of the stuff I deleted was in the tmp directory, and really shouldn't have been used by any open process, but I'll look through the processes.
Well, good luck to me.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
Samba: 70 Gb free space, samba reports no space left? HansLuijten Linux - Networking 1 08-18-2004 04:40 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:37 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
Open Source Consulting | Domain Registration