Category Archives: CentOS

Display output of multiple log files with tail

To show the output from all log files in a directory, run:

tail -f *.log

Output example:

==> log1 <==
1.2.3.4 - - [16/Nov/2014:03:31:06 +0000] "GET /robots.txt HTTP/1.1" 200 107
1.2.3.4 - - [16/Nov/2014:03:31:07 +0000] "GET / HTTP/1.1" 200 7777
1.2.3.4 - - [16/Nov/2014:03:36:05 +0000] "GET /robots.txt HTTP/1.1" 200 107

==> log2 <==
1.2.3.4 - - [16/Nov/2014:05:39:36 +0000] "GET / HTTP/1.1" 200 34569
1.2.3.4 - - [16/Nov/2014:05:40:44 +0000] "POST /wp-admin/ HTTP/1.0" 200 961
1.2.3.4 - - [16/Nov/2014:05:40:57 +0000] "POST /wp-admin/ HTTP/1.0" 200 50505