concatenate compressed and uncompressed logs

2010-06-21 204 words 1 min read

<span style="font-size: x-large;"><a href="">concatenate compressed and uncompressed logs

$ find /var/log/apache2 -name 'access.loggz' -exec <a class="zem_slink freebase/en/gzip" title="Gzip" rel="homepage" href="">zcat {} ; -or -name 'access.log' -exec cat {} ; This command allows you to stream your log files, including gziped files, into one stream which can be piped to <a class="zem_slink freebase/en/awk" title="AWK" rel="homepage" href="">awk or some other command for analysis.

Note: if your version of &#8217;find&#8217; supports it, use:

find /var/log/apache2 -name 'access.loggz' -exec zcat {} + -or -name 'access.log' -exec cat {} +

  • <a href="">View this command to comment, vote or add to favourites
  • <a href="">View all commands by <a href="">recursiverse

<a href=""><img src="" alt="" align="bottom" />

by David Winterbottom (<a href="">

<a href=""><img src="" border="0" alt="" align="bottom" />
<a href=""><img src="" border="0" alt="" align="bottom" />

<img src="" border="0" alt="" width="1" height="1" align="bottom" />

URL: <a href=""><h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="">How to Combine GZip + CDN for Fastest Page Loads ( <li class="zemanta-article-ul-li"><a href="">Get Ready for WordPress 3: Backup Your Database ( <li class="zemanta-article-ul-li"><a href="">Uncompressed data in base64? Probably not ( <li class="zemanta-article-ul-li"><a href="">Compression algorithms used by Google ( <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href=""><img class="zemanta-pixie-img" src="" alt="Enhanced by Zemanta" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">


Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it