Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i accidently zipped a log file of process (the process wasnt writing in it though, it writes it only during weekends when the process get killed).I unzipped the file immediately back. will it affect the process when it is trying to write in the log file?

share|improve this question

migrated from Mar 19 '10 at 3:49

This question came from our site for professional and enthusiast programmers.

It depends on how the process manages the descriptor to the open log file.

If it keeps the descriptor open, then it will continue writing the old file. Even though you may have deleted the file and it is no longer in the file system directory, as long as the process keeps it open the file is still in the file system.

If the process reopens the file each time it needs to write, then it will write to your unzipped file.

My experience with logging subsystems is it is more common to keep the descriptor open. So I think it is less likely for the process to start writing the newly unzipped file.

Sometimes, when a process will reload it's configuration (and reopen it's log file) when you send it the proper signal. You should check the documentation and try that.

share|improve this answer

make use of a named pipe in unix

create a named pipe

mknod test.pipe p

read the pipe - output to zip file in the background

gzip < exp.pipe > your_operation/script

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.