
254
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-h host
Specify name of remote host. Normally used by servers, not
humans; may be used only by root.
-p Preserve previous environment.
logname
logname [option]
Consult /var/run/utmp for user’s login name. If found, print it;
otherwise, exit with an error message.
Options
--help
Print a help message and then exit.
--version
Print version information and then exit.
logrotate
logrotate [options] config_files
System administration command. Manipulate logfiles according to
commands given in config_files.
Options
-d, --debug
Debug mode. No changes will be made to logfiles.
-f, --force
Force rotation of logfiles.
-h, --help
Describe options.
-m command, --mail command
Use the specified command to mail logfiles. The default
command 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 logfiles are affected.
Configuration Commands
Logrotate directives may appear on their own or as part of logfile
definitions—instructions for specific logfiles. You may use wild-
cards to specify those files. Enclose directives for logfile definitions
in a beginning and ending curly brace. For example:
compress
/var/log/messages {
rotate 5
weekly
}