Skip to content

Instantly share code, notes, and snippets.

@nekoya
Created September 17, 2012 12:51
Show Gist options
  • Select an option

  • Save nekoya/3737104 to your computer and use it in GitHub Desktop.

Select an option

Save nekoya/3737104 to your computer and use it in GitHub Desktop.
wiki/swatch

start

swatch -c /home/ryo/.swatchrc --read-pipe="tail --follow=name --lines=1 /var/log/httpd/error_log"

ファイルを追いかけるように--read-pipe指定。ふつうにファイル指定するとinodeを見るので、rotateに対応出来ない。

適当なタイミングでswatchを再起動するという方法もあるが、イケてない感じがするのでこれで試す。

stop

ふつうにkill出来ないので、

kill -SIGKILL $pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment