Quote:>I want to periodically save and empty the /var/log/messages file.
>How do I do this correctly, I tried renaming the file, zipping it and touching a new messages file,
>but after that all logging is not saved to the newly placed messages file (it remained empty).
>What went wrong?
The system logger doesn't know about what you did, so it's still writing to
where it thinks the log file is/was. In the future, you can do this:
cp -p /var/log/messages /var/log/messages.currentdate
Information Technology and Systems Management Consulting
To send me email, replace 'nospam' with 'home'.