concatenate compressed and uncompressed logs

2010-07-15 1 min read bash Fedora Linux
<span style="font-size: x-large;"><a href="http://feedproxy.google.com/~r/Command-line-fu/~3/iwFUyltYgjM/concatenate-compressed-and-uncompressed-logs">concatenate compressed and uncompressed logs $ find /var/log/apache2 -name 'access.loggz' -exec <a class="zem_slink freebase/guid/9202a8c04000641f800000000001abd9" title="Gzip" rel="homepage" href="http://www.gzip.org/">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/guid/9202a8c04000641f800000000000584b" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk or some other command for analysis. Note: if your version of &#8217;find&#8217; supports it, use: Continue reading

The power of find command in Linux โ€“ advanced.

2010-05-24 2 min read Linux
Generally whoever uses Linux, would know about the find command. Find the man page <a href="http://amit.themafia.info/phpMan.php?parameter=find&mode=man" target="_blank">here. There are also lots of blogs, tutorials and other articles on find command on the web, so why write another one. Because it&#8217;s worth every word spent on it ๐Ÿ™‚ find is a very powerful command, let&#8217;s see how (options for find command from man page and usage): โ€“depth โ€” Process each directory&#8217;s contents before the directory itself. Continue reading