使用watch命令来监控日志
http://jamesseibel.com/blog/?p=11
How to Tail a Directory in Linux Posted on July 30, 2012 I’m often tailing log files and whatnot during my development and debugging process. However, I stumbled into a situation where (for various complicated reasons) the best way to solve a problem was to touch files on disk and use those to drive execution. Unfortunately, I didn’t have an easy way to view the live changes to a directory as I stepped through my code. Luckily, where there is will there is a way:
watch “tail -n 3 /var/baoz/stat/workspace/logs/s11.baoz.cn/access/* » s1.log”
dtruss dtrace
strace