我正在尝试配置 inotifywait 来查看我的日志目录,这样我就可以将它们发送到像 rsyslog 这样的记录器和文件中。
到目前为止,我有这个:
/usr/bin/inotifywait -e create,modify -dqs -o /newlogs /logs
以下是那些试图学习这一点的人的论据:
e - use following event triggers (create and modify in example)
d - daemon mode
q - quiet mode
s - send to syslog
o - output path (/newlogs)
/logs - dir to watch
我可以看到进入 newlogs 文件的事件,但 syslog 的“-s”参数似乎不起作用。有人可以帮忙吗?
谢谢。