Easy Tutorial
❮ Linux Comm Lpq Linux Comm Tcpdump ❯

Linux logrotate Command

Linux Command Manual

The Linux logrotate command is used to manage log files.

Using the logrotate command, you can easily manage the log files generated by the system. It provides automatic rotation, compression, deletion, and mailing of log files. Each log file can be set to be processed daily, weekly, or monthly, and can also be processed immediately if the file becomes too large. You must manually edit and specify the configuration file. The default configuration file is located in the /etc directory with the name logrotate.conf.

Syntax

logrotate [-?dfv][-s <state file>][--usage][configuration file]

Parameter Description:

Example

Specify log file

# logrotate /root/log.config

Linux Command Manual

❮ Linux Comm Lpq Linux Comm Tcpdump ❯