Sample Header Ad - 728x90

Monitor Apache Selectively

0 votes
0 answers
40 views
I am working to parse apache logs in Common Format in realtime so that I monitor them while I work. "tail -F /var/log/apache2/access.log" works but provides more than I need. "awk '{print $1 " " $2 " " $3 " " $4 " "}'access.log " gives the parts I need but of course runs x1 and I do not know the bash well enough (yet!) to loop on something like file change etc. So I would like to pipe "|" the output of the tail expression above to the awk expression above. Also, I would like for this output to print last line of the access.log at the top of the screen, not the bottom.
Asked by Dahere (11 rep)
Apr 10, 2019, 06:13 PM
Last activity: Apr 10, 2019, 10:40 PM