Skip to Main Content
Linux in a Nutshell, Fourth Edition
book

Linux in a Nutshell, Fourth Edition

by Ellen Siever, Stephen Figgins, Aaron Weber
June 2003
Beginner to intermediate content levelBeginner to intermediate
944 pages
43h 1m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, Fourth Edition

Name

logrotate

Synopsis

                  logrotate [options] config_files
               

System administration command. Manipulate log files according to commands given in config_files.

Options

-d, --debug

Debug mode. No changes will be made to log files.

-f, --force

Force rotation of log files.

-h, --help

Describe options.

-m command, --mail command

Use the specified command to mail log files. The default is /bin/mail -s.

-s file, --state file

Save state information in file. The default is /var/lib/logrotate.status.

--usage

Show syntax and options.

-v, --verbose

Describe what is being done and what log files are affected.

Commands

compress

Compress old versions of log files with gzip.

compresscmd command

Use command to compress log files. Default is gzip.

compressext extension

Append filename extension to compressed files instead of the compress command’s default.

compressoptions options

Specify options to pass to the compress command. Default for gzip is -9 for maximum compression.

copy

Copy log file, but do not change the original.

copytruncate

Copy log file, then truncate it in place. For use with programs whose logging cannot be temporarily halted.

create [permissions] [owner] [group]

After rotation, re-create log file with the specified permissions, owner, and group. permissions must be in octal. If any of these parameters is missing, the log file’s original attributes will be used.

daily

Rotate log files every day.

delaycompress

Don’t compress log file until the next rotation.

endscript

End a postrotate or ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
Linux in Action

Linux in Action

David Clinton
Hands-On System Programming with Linux

Hands-On System Programming with Linux

Kaiwan N. Billimoria, Tigran Aivazian
Embedded Linux for Developers

Embedded Linux for Developers

Alexandru Vaduva, Alex González, Chris Simmonds

Publisher Resources

ISBN: 0596004826