Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-23-2009, 11:15 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 22

Rep: Reputation: 0
Wink Delete system log file but the space not released

I have empty the log file using:
cat /dev/null >/var/spool/compaq/cma.log
but the space is not released.

I checked the process which opening the log file, but no process found.
lsof /var/spool/compaq/cma.log

Could you please let me know how to find the process. I don't want to reboot the system.


Old 04-23-2009, 03:09 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,493
Blog Entries: 15

Rep: Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463
It may be that due to an "open" of file by some process your cat didn't work on the existing inode but instead made it delete the name and create it on a new inode.

What you might try is to run:
lsof |grep " REG " |more
scan the "SIZE" column to see if there are any large sized files that have no name. The PID associated with any such you find is likely the one that has the old inode "open". Killing such a PID would free the space. However, you'd want to examine the PID with ps first to be sure it is something safe to kill.


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
rotating apache logs.....looking for a good script to delete old log file ringding Linux - Server 3 04-01-2009 10:57 AM
Can't delete file - system just crash everal Slackware 3 01-23-2007 01:36 PM
cannot delete or rotate messages log file dan451 Linux - Newbie 14 08-04-2006 04:13 PM
I've deleted a log file to save space and... ganninu Linux - General 3 11-04-2003 12:03 PM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 07:45 AM > Forums > Linux Forums > Linux - Newbie

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

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