It it safe to delete daily_out.log


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers It it safe to delete daily_out.log
# 1  
Old 04-15-2009
It it safe to delete daily_out.log

I have a log file daily_out.log. At present it zero kb, however in the past before i attempted to rotate it - it was 100MB. I did an
Code:
sudo lsof /var/log/daily_out.log

and it returned nothing. Since i rotated the log I have restarted the machine. But the log is not being used anymore. Is it safe to assume that if no deamon has a handle open to that file at present then I can delete it. If a process did come on and start wanting to use it would it recreate it. Also i have recently noticed another file called daily.out that might have been created to take over from daily_out.log. Is it possible that when rotated the log daily_log.out it couldn't write to the new one, so decided to create another new file called daily.out?
# 2  
Old 04-15-2009
Sorry to write something different.
I'm new in this forum but i wanted to post a question, how do i do that?
# 3  
Old 04-15-2009
@timgolding: It might be the same daemon, although not for the reason you described. An open file handle usually survives a rename of a file, and daemons rather complain about a missing file/inability to create a file than to randomly create variations of a filename

@victorn: Literacy, the ability to think for yourself, and deduction are key points to it. Follow this link to the "UNIX for Dummies Questions & Answers" forum. On the left side, near the top you should see a button labeled "New Thread". Click it. Give your thread a descriptive title (not just "Help me" or something similar trivial). Give a good description of your problem. Click "Submit New Thread". It's really not any more complicated than creating an account (which you already managed)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Red Hat

Need Script to ZIP/SAVE & then DELETE Log file & DELETE ZIPS older than 12 months

ENVIROMENT Linux: Fedora Core release 1 (Yarrow) iPlanet: iPlanet-WebServer-Enterprise/6.0SP1 Log Path: /usr/iplanet/servers/https-company/logs I have iPlanet log rotation enabled rotating files on a daily basis. The rotated logs are NOT compressed & are taking up too much space. I... (7 Replies)
Discussion started by: zachs
7 Replies

2. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

3. Solaris

Async-Signal-Safe versus MT-Safe

Hi, I am Solaris 9 developer and notice that the documentation does not provide a clear notion of the inherent concurrency in routines defined as "Async-Signal-Safe". Routines defined as "MT-Safe" obviously have the best level of concurrency, compared to normal "Safe" interfaces. I have... (1 Reply)
Discussion started by: tristan12
1 Replies
Login or Register to Ask a Question