LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 04-16-2008, 08:20 PM   #1
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 403

Rep: Reputation: 31
how to clean /var directory


Hi, ALl

RHEL4 /var directory has reached 100%.
I deleted some big file but /var still stops at 100% via checking df -hk.
I wonder how to check why /var grows so fast.
 
Old 04-16-2008, 08:43 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
It's probably /var/log or the directory your rpms are cached in. You can use the du command to see where the usage is:
Code:
du -csh /var/*
You can use logrotate to manage your log directory.
 
Old 04-17-2008, 12:53 AM   #3
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 403

Original Poster
Rep: Reputation: 31
Thanks for your advices.
 
Old 04-17-2008, 02:41 AM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 9,010

Rep: Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353
If you delete log files, the disk usage still reports 100% until you restart the syslogd service. Indeed, if the deleted files were in use, the application created a hard link to them, so deleting the file does not actually free the disk space. Restarting the syslogd service (or any other application which kept files busy) let the system to release the hard links and finally free the disk space.

To check which application make use of a certain file, you can try the command (as root)
Code:
lsof name_of_file_to_be_deleted
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change default vsftp anonymous accout directory /var/ftp to other directory? hocheetiong Linux - Newbie 2 01-24-2010 06:33 PM
var directory anhtt Solaris / OpenSolaris 5 08-11-2007 03:33 PM
Regenerate Slack12 var directory rhb327 Slackware 2 07-09-2007 06:05 AM
Solaris 9 /var directory is at 100% rust8y Solaris / OpenSolaris 4 05-05-2006 05:54 PM
How to clean up /var/log/messages ? JaBa Linux - General 10 10-30-2004 12:32 AM


All times are GMT -5. The time now is 05:36 PM.

Main Menu
 
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
Open Source Consulting | Domain Registration