BSD家族大观 --1. FreeBSD
Swatch - simple watcher
◎安装 更新相关档案(cvsup) /usr/ports/security/swatch # make install /usr/ports/security/swatch # make clean ◎语法 swatch [ --config-file file ] [ --restart-time time ] [--input-record-separator regex ] [ [ --examine file_to_examine ] | [ --read-pipe program_to_pipe_from ] | [ --tail file_to_tail ] ] [ --daemon ] ◎swatch叙述: Swatch是被设计用来监视系统动作的程式。 为了要让Swatch能够更加的强大,他需要一个用以比对的设定档。 ◎命令列的参数: --config-file=filename or -c filename 此参数告诉swatch到哪里去寻找他的设定档案。 预设值是放在${HOME}/.swatchrc 。 --help 显示使用说明。 --input-record-separator=regular_expression 此参数告诉swatch使用规则表示式来描绘每笔记录的边界。 预设值是return。 --restart-time=[+]hh:mm[am|pm] or -r [+]hh:mm[am|pm] 在特定的时间之後重新启动,hh代表小时,mm代表分钟。 若am/pm被省略,则使用24小时制。 若时间前加有"+"这个符号,则代表从新启动时间为, 从目前时间再加上特定时间,此时am/pm会被忽略。. --script-dir=/path/to/directory 这个参数将产生的暂存script档案存放到特定的资料夹, 而不是使用者的家目录之下。 强烈建议,您不要使用别的使用者也有权限写入的资料夹, 举例来说/tmp。 --version or -V 显示版本资讯。 以下的参数,不能并存,只能选择其一执行。 --tail-file=filename or -t filename 当他们被附加到某一档案时,以行为单位检视文字档案。 --read-pipe=command or -p command 从命令检视输入。 --examine=filename or -f filename 将filename视为检视档案来检视。swatch将会进行一个个别检视经由这个档案。 以下的参数纯粹用於除错过程,但是为了完整性仍将其列出。 --dump-script[=filename] 当watcher script产生时,不执行之反而将其写入到一个档案或者到标准输出。 若swatch在无参数状态执行,如同加入下列参数执行。 swatch --config-file=~/.swatchrc --tail- file=/var/log/syslog 若 /var/log/messages 存在,则 swatch --config-file=~/.swatchrc --tail- file=/var/log/messages 若设定档不存在,以下的设定则被使用。 watchfor /.*/ echo modes=random 搜寻比对档案中所有以.*开头的行 并且用随机模式显示色彩型态。 ◎设定档说明: 这个设定档由swatch(8)程式去界定什麽型态的表达样式需要被搜寻比对。 每一行需包含一个关键字及一个关键字的值(有时是选择性的)。 关键字及其值,以一个空白键或等号"="分隔。 watchfor regex ignore regex echo [modes] 以何种颜色显示符合的行。 这些模式能在xterm上显示,其中Normal(正常字)是预设值。 可用的值: normal(正常字),bold(粗体), underscore(底线), blink(闪烁), inverse(倒反), black(黑), red(红), green(绿),yellow(黄), blue(蓝), magenta(品红), cyan(青绿), white(白), black_h, red_h,green_h, yellow_h, 上一篇:BSD家族大观 --3. NetBSD 下一篇:FreeBSD 中 Samba Server安装设定 更多相关文章
|
推荐文章
精彩文章
|