vincent's Blog

一個無聊的網路雜工的紀錄!!

logadm -h


Usage: logadm [options]
(processes all entries in /etc/logadm.conf or conffile given by -f)
or: logadm [options] logname...
(processes the given lognames)

General options:
-e mailaddr mail errors to given address
-f conffile use conffile instead of /etc/logadm.conf
-h display help
-N not an error if log file nonexistent
-n show actions, don't perform them
-r remove logname entry from conffile
-V ensure conffile entries exist, correct
-v print info about actions happening
-w entryname write entry to config file

Options which control when a logfile is rotated:
(default is: -s1b -p1w if no -s or -p)
-p period only rotate if period passed since last rotate
-P timestamp used to store rotation date in conffile
-s size only rotate if given size or greater

Options which control how a logfile is rotated:
(default is: -t '$file.$n', owner/group/mode taken from log file)
-a cmd execute cmd after taking actions
-b cmd execute cmd before taking actions
-c copy & truncate logfile, don't rename
-g group new empty log file group
-m mode new empty log file mode
-o owner new empty log file owner
-R cmd run cmd on file after rotate
-t template template for naming old logs
-z count gzip old logs except most recent count

Options which control the expiration of old logfiles:
(default is: -C10 if no -A, -C, or -S)
-A age expire logs older than age
-C count expire old logs until count remain
-E cmd run cmd on file to expire
-S size expire until space used is below size
-T pattern pattern for finding old logs

0 意見

張貼留言

Categories

追蹤者

Change Language

Your Source