Tail multiple files at once:
tail -f log1.log log2.log
If you want to highlight something when doing ‘tail -f’ you can use the following command:
tail -f /var/log/logfile | perl -p -e 's/(SEARCH)/33[7;1m$133[0m/g;'
Or if your terminal supports colours, such as linux terminal, you can use this:
tail -f /var/log/logfile | perl -p -e 's/(SEARCH)/33[46;1m$133[0m/g;'
And if you want it to beep (annoy you!) on a match use this:
tail -f /var/log/logfile | perl -p -e 's/(SEARCH)/33[46;1m$133[0m07/g;'
Another option using sed instead:
tail -f /var/log/logfile | sed "s/(SEARCH)/^[[46;1m1^[[0m/g"
Note that in the last example you have to actually type “cntl-v cntl-[” in place of “^[”
For a full list of control characters on Linux see:
man console_codes