LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-04-2009, 09:27 AM   #1
beny2
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
how to free up space on my hard drive?


Tried to delete files from a partition who got full.
used rm, check with df -h, and du. They show different sizes
If I reboot, the df and du will match

Code:
shell# df -h /home
Filesystem                      Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol05 3.9G 3.9G 0     100% /home
Code:
shell# du -h -s * | sort -k1 -g -r | grep home
1.6G home
Is there any command I can use to clear the space without restarting the system.
Any suggestion will be greatly appreciated.
Thanks

Last edited by GrapefruiTgirl; 10-05-2009 at 01:42 PM. Reason: <mod edit> added [code] tags to clarify shell outputs </mod edit>
 
Old 10-05-2009, 02:11 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
I usually trust 'df' to give accurate results, results will be updated as soon as you free up some space. A restart is not required for the space to become available

cheers
 
Old 10-06-2009, 09:18 AM   #3
beny2
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your reply.
I did trust the df too till when I was deleting files the df wasn't updating the size left.
The du helped to see the right size.
As I explained the partition will stay full after removing files.
Still unclear why this behavior. And to get the free space back, I had to reboot the system.
I am looking for a command to replace rebooting the system to clear the space.
 
Old 10-06-2009, 06:43 PM   #4
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Quote:
Originally Posted by beny2 View Post
Thanks for your reply.
As I explained the partition will stay full after removing files.
I think you didn't remove more than 1% of the files and the df can't show any different if it less than that.

So it has to be removed more than 39Mb files.

Laz.
 
Old 10-06-2009, 08:38 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
See post #4 here: http://www.unix.com/unix-advanced-ex...nt-output.html
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing hard drive free space encomium Linux - Server 3 03-26-2008 02:11 AM
how much free space should I leave on my hard drive? alex.flint Linux - Software 1 06-19-2007 09:26 PM
Caculating free space on Hard Drive adamb10 Linux - General 3 06-12-2005 12:18 PM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Hard Drive free space gatorbyte Linux - Software 3 05-12-2003 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:33 AM.

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