OpenSolaris Solaris Forum  
     

Left Nav Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Right Nav

Left Container Right Container
 

Go Back   OpenSolaris Solaris Forum » Solaris General

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-21-2008, 11:49 AM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default Can't make a file empty

Hi All,

I have a log file of size 160 MB and it is continuosly increasing. To reduce it want to make it empty at certain interval. To do this I use following command

echo "" > abc.log

as an alternative I've also used :

> abc.log

After using this command, I saw that file becomes 0 KB but suddenly after 15-20 seconds I found that file has again become 160 MB in size.

Please tell me the reason for this problem, and also tell me that how can I make my log file empty.

Thanks,
Ritesh Pandey
Reply With Quote
Sponsored Links

  #2 (permalink)  
Old 06-22-2008, 08:22 PM
Administrator
 
Join Date: May 2008
Posts: 15
Default

are you sure that no application is pumping in huge amounts of data in file after you empty it ?
and why dont you use logrotate
Reply With Quote
  #3 (permalink)  
Old 06-24-2008, 08:23 AM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

Hi,

I am 100% sure that no any other process is writting any bulk data in that file. And more important thing is that I got the same size file after making it empty after few seconds.

I am very confuse, why is it happening.

Thanks,
Ritesh
Reply With Quote
Reply

Thread Tools
Display Modes

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



All times are GMT. The time now is 03:55 AM.


Powered by vBulletin. Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.