OS Manuals

/usr/bin/logrotate

tool to rotate logfiles

From logrotate 3.22.0-r47 (os), captured 2026-11-05 by running logrotate --help (exit 0). permalink

Usage: logrotate [OPTION...] <configfile>
  -d, --debug                   Don't do anything, just test and print debug
                                messages
  -f, --force                   Force file rotation
  -m, --mail=command            Command to send mail (instead of `/bin/mail')
  -s, --state=statefile         Path of state file
      --skip-state-lock         Do not lock the state file
      --wait-for-state-lock     Wait for lock on the state file
  -v, --verbose                 Display messages during rotation
  -l, --log=logfile             Log file or 'syslog' to log to syslog
      --version                 Display version information

Help options:
  -?, --help                    Show this help message
      --usage                   Display brief usage message
Options (11)
OptionDescriptionSource
-d, --debugTurn on debug mode, which means that no changes are made to the logs and the logrotate state file is not updated.help + man
-f, --forceTells logrotate to force the rotation, even if it doesn't think this is necessary.help + man
-m, --mail commandTells logrotate which command to use when mailing logs.help + man
-s, --state statefileTells logrotate to use an alternate state file.help + man
--skip-state-lockDo not lock the state file, for example if locking is unsupported or prohibited.help + man
--wait-for-state-lockWait until lock on the state file is released by another logrotate process.help + man
-v, --verboseTurns on verbose mode, for example to display messages during rotation.help + man
-l, --log logfileTells logrotate to log verbose output into the log_file.help + man
--versionDisplay version information.help + man
-?, --helpShow this help messagehelp + man
--usagePrints a short usage message.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.