|
|
|
|
|
by jolmg
2426 days ago
|
|
I just found out a few days ago that `-F` works with multiple files, too. When there's new content on one, tail prefixes the output with a header, telling you what file it is. I've used that to watch all logs apache and descendant processes could be writing to: pstree -p $(pgrep -o apache2) \
| grep -Po '[^}]\(\K\d+'
| sed ':b;N;$!bb;s/\n/,/g' \
| sudo xargs lsof -d 0-1000 -a -p \
| grep -Po '\S+$' \
| grep 'log' \
| sort -u \
| xargs tail -F
|
|