Skip to Content

Preserve Log File Descriptor

Have you ever tried to clear a log file by removing the file, then touching a new one only to find your daemon does not write to the new file? So you restart the daemon and it still doesn't work? If you do this, chances are you will have to restart syslogd so it can find the new file descriptor you created when you touched the log.

If you are debugging and want a clear log, a better solution is write empty space to the file like this:

# echo "" > /opt/zimbra/log/zmmailboxd.out

This will empty the file and preserve the file descriptor.