3 ms·
tail -F This will also follow a log file if it rotates.
by jjjbokma 7y ago
tail -F
This will also follow a log file if it rotates.
- jolmg 7y agoI 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