Results 1 to 2 of 2

Thread: logrotate log file

  1. #1

    Default logrotate log file

    I have a script running 24/7 collecting network data to a log file. I would like to kill the <PID> of that script every night and rotate the log file from "log_file" to "log_file.1". How do I tell logrotate to rotate the file every night?

    Thanks for any suggestions.

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: logrotate log file

    Put a config file in /etc/logrotate.d/ You can look at one of the existing ones for an example, e.g. apache2. For the syntax of the file, look at man logrotate.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •