Useful Snippets

Welcome!


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Subscribe to RSS feed


Display output of multiple log files with tail

Stanislav KhromovStanislav Khromov

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

Full-stack impostor syndrome sufferer & Software Engineer at Schibsted Media Group

Comments 0
There are currently no comments.