concatenate compressed and uncompressed logs

2010-06-21 1 min read Bash 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/en/gzip" 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/en/awk" 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

Scribblenauts

2010-06-20 1 min read Linux

<a href="http://xkcd.com/637/"><img src="http://blog.amit-agarwal.com/wp-content/uploads/imgs.xkcd.com/comics/scribblenauts.png" alt="Let me look away and type 'guy who's just jealous that I beat all his MarioKart times' and turn back, and … yup, there you are again!" />

How To Quickly Check If You’re Running A Javascript Enabled Browser

2010-06-20 4 min read Uncategorized

**<span style="font-size: x-large;"><a href="http://feedproxy.google.com/~r/Makeuseof/~3/e5yad0IRQV0/">

**

<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/javaHead1.png" border="0" alt="javascript enabled browser" align="bottom" /><a href="http://www.makeuseof.com/tag/what-is-javascript-how-works">Javascript is an integral part of <a class="zem_slink freebase/en/web_browser" title="Web browser" rel="wikipedia" href="http://en.wikipedia.org/wiki/Web_browser">web browsing and a lot of websites use Javascript for web applications and functions. A question I get at AskTheAdmin.com often is how I can tell if I am using a Javascript enabled browser. I have two quick methods to tell if the browser you are using does or does not support Javascript.

Continue reading

Enhance photos quickly with GIMP

2010-06-17 3 min read Fedora Photo

Okay today I will show you how to enhance or make the photo look better with GIMP. Digital photos are good but can be made better with GIMP. I will take you step by step with the process. There are many other things that you can do but I will cover only basic stuff. So here we go.

Take a photo of your choice.

<img class="size-full wp-image-503" title="Monkey" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/dscf5962.jpg" alt="Monkey" width="387" height="542" />

Continue reading

Using tput to save, clear and restore the terminal contents

2010-06-17 1 min read Linux

Using tput to save, clear and restore the terminal contents $ tput smcup; echo &#8221;Doing some things…&#8221;; sleep 2; tput rmcup Very useful for interactive scripts where you would like to return the terminal contents to its original state before the script was run. This would be similar to how vi exits and returns you to your original terminal screen.

Save and clear the terminal contents with:

tput smcup

Continue reading

Linux command to repeat a string n times

2010-06-17 1 min read Bash

There are more than one situation where you wished that there was a simple way to print a character n number of times. At least I face that quite often, especially when you want to print a menu. I found this post today which has pretty good solution and also the way how it works :
<a href="http://superuser.com/questions/86340/linux-command-to-repeat-a-string-n-times">http://superuser.com/questions/86340/linux-command-to-repeat-a-string-n-times

\"Enhanced
Older posts Newer posts