3 ms·
grep, find, tail -f (useful to look at log files as they update) Extras: sort, uniq, sed, sftp, apropos, man
by antoineMoPa 7y ago
grep, find, tail -f (useful to look at log files as they update)
Extras: sort, uniq, sed, sftp, apropos, man
- jjjbokma 7y agotail -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