LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-23-2009, 11:15 AM   #1
yuanjunliang
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.

Thanks,

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

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


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
rotating apache logs.....looking for a good script to delete old log file ringding Linux - Server 6 04-25-2020 12:59 PM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:22 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