More solaris commands

2010-06-29 2 min read Solaris

These commands are taken from various sources and are quite helpful for day to day work on solaris.

For find n grep

grep -i m_forwardingProxy `find . -name \*cpp`

grep -i XVarBind `find . -name \*h`

grep -i gSLEncodeMode `find .  -name ”*.cpp” -o -name ”*.h”`

 
 
Find:

find . \( -name ”*.cpp” -o -name ”*.h” -o -name ”*.c” -o -name ”*.cc” -o -name ”*.inh” -o -name ”*.inc” -o -name ”*.sm” -o -name ”*.asm” \)

Continue reading

Getting your wordpress self hosted stats on your console with bash script.

2010-06-29 3 min read Bash Learning

Some time back I wrote a blog on how to get your site stats using curl in <a class="zem_slink freebase/en/bash" title="Bash" rel="homepage" href="http://tiswww.case.edu/php/chet/bash/bashtop.html">bash shell. Today we will use the same script to get the stats every few seconds on the terminal on the same line, similar to progress meter.

Here is the script and the description:

  <td>
    <div class="bash codecolorer">
      <span class="co0">#!/bin/bash -</span><br /> <span class="co0">#===============================================================================</span><br /> <span class="co0">#</span><br /> <span class="co0">#          FILE:  update_stats.sh</span><br /> <span class="co0">#</span><br /> <span class="co0">#         USAGE:  ./update_stats.sh</span><br /> <span class="co0">#</span><br /> <span class="co0">#   DESCRIPTION:  Update the stats inline in shell every $1 seconds.</span><br /> <span class="co0">#</span><br /> <span class="co0">#       OPTIONS:  ---</span><br /> <span class="co0">#  REQUIREMENTS:  ---</span><br /> <span class="co0">#          BUGS:  ---</span><br /> <span class="co0">#         NOTES:  ---</span><br /> <span class="co0">#        AUTHOR:  <a class="zem_slink" title="Amit Agarwal" rel="homepage" href="http://amit-agarwal.co.in">Amit Agarwal</a> (AKA), amit.agarwal@amit-agarwal.co.in</span><br /> <span class="co0">#       COMPANY:  Individual</span><br /> <span class="co0">#       VERSION:  1.0</span><br /> <span class="co0">#       CREATED:  06/21/2010 11:27:16 PM IST</span><br /> <span class="co0">#      REVISION:  ---</span><br /> <span class="co0">#===============================================================================</span><br /> <br /> <span class="re2">sleep_time</span>=<span class="nu0">30</span> <span class="co0">#the time to wait between stats collection</span><br /> <span class="re2">run_stats</span>=get_stats  <span class="co0"># the script to run to get the stats</span><br /> <span class="re2">filename</span>=<span class="sy0">/</span>tmp<span class="sy0">/</span>statpress.html <span class="co0"># the filename where the script is storing the html file of your statpress page.</span><br /> <span class="kw3">eval</span> <span class="re1">$run_stats</span> <span class="nu0">2</span><span class="sy0">><</span>a <span class="re2">class</span>=<span class="st0">"zem_slink freebase/en/dev_null"</span> <span class="re2">title</span>=<span class="st0">"/dev/null"</span> <span class="re2">rel</span>=<span class="st0">"wikipedia"</span> <span class="re2">href</span>=<span class="st0">"http://en.wikipedia.org/wiki//dev/null"</span><span class="sy0">>/</span>dev<span class="sy0">/</span>null<span class="sy0"></</span>a<span class="sy0">></span><br /> <span class="kw1">while</span> <span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span><br /> <span class="kw1">do</span><br /> <span class="sy0"><!</span>--loginview start--<span class="sy0">></span><span class="re2">values</span>=$<span class="br0">&#40;</span><span class="kw2">cat</span> <span class="re1">$filename</span> <span class="sy0">|</span> w3m <span class="re5">-dump</span> <span class="re5">-T</span> <span class="sy0"><</span>a <span class="re2">class</span>=<span class="st0">"zem_slink freebase/en/html"</span> <span class="re2">title</span>=<span class="st0">"HTML"</span> <span class="re2">rel</span>=<span class="st0">"wikipedia"</span> <span class="re2">href</span>=<span class="st0">"http://en.wikipedia.org/wiki/HTML"</span><span class="sy0">></span>text<span class="sy0">/</span>html<span class="sy0"></</span>a<span class="sy0">></span> <span class="sy0">|<</span>a <span class="re2">class</span>=<span class="st0">"zem_slink freebase/en/grep"</span> <span class="re2">title</span>=<span class="st0">"Grep"</span> <span class="re2">rel</span>=<span class="st0">"wikipedia"</span> <span class="re2">href</span>=<span class="st0">"http://en.wikipedia.org/wiki/Grep"</span><span class="sy0">></span><span class="kw2">grep</span><span class="sy0"></</span>a<span class="sy0">></span> <span class="st0">"^Visitor\\|^Pageviews"</span><span class="sy0">|<</span>a <span class="re2">class</span>=<span class="st0">"zem_slink freebase/en/awk"</span> <span class="re2">title</span>=<span class="st0">"AWK"</span> <span class="re2">rel</span>=<span class="st0">"homepage"</span> <span class="re2">href</span>=<span class="st0">"http://cm.bell-labs.com/cm/cs/awkbook/index.html"</span><span class="sy0">></span><span class="kw2">awk</span><span class="sy0"></</span>a<span class="sy0">></span> <span class="co3">\'</span><span class="br0">&#123;</span>print <span class="re4">$1</span><span class="nu0"></span><span class="br0">&#125;</span><span class="co3">\'</span><span class="sy0">|</span><span class="kw2">tr</span>  <span class="st0">"\<span class="es1">\n</span>"</span> <span class="st0">" "</span><span class="br0">&#41;</span><br /> <span class="re2">time</span>=$<span class="br0">&#40;</span><span class="kw2">date</span><span class="br0">&#41;</span><br /> <span class="kw3">printf</span> <span class="st0">"<span class="es2">$time</span> --> <span class="es2">$values</span> \<span class="es1">\r</span>"</span><span class="sy0"><!</span>--loginview end--<span class="sy0">></span><br /> <span class="kw2">sleep</span> <span class="re1">$sleep_time</span><br /> <span class="kw1">done</span>
    </div>
  </td>
</tr>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
\"Enhanced

wordpress blog stats monitoring from remote using curl and bash and send it in mail.

2010-06-25 3 min read Bash Fedora Linux

Here&#8217;s something that I had been planning to do for sometime now. I have my blog on wordpress and have Statpress plugin installed. The plugin does give me a good idea of the visits to my site. Now, I have to keep logging in every now and then to check the stats. Also since I did not want to spend some more amount 🙂 so I do not have the shell access to the server, too bad 🙁

Continue reading

6700 free and redistributable fonts for Linux.

2010-06-25 1 min read Fedora Linux

Today I was searching for some good fonts for my desktop running Fedora 11 – Leonidas. In my quest to find the required fonts that I would liked, I reached some good sites so just thought would share the same with you.

First, how do you use them, simple steps:

mkdir ~/.fonts

Now you can put your fonts in this directory. You can make sub-directories to keep your fonts organized. On F11, I did not need to refresh the font server or logout and login. 🙂

Continue reading

rawtherapee -- raw image processor.

2010-06-25 0 min read Fedora Photo
\"Original
Image via Wikipedia

<a href="http://www.rawtherapee.com/?mitem=3&artid=47">Download RT v3.0 alpha 1:

http://www.rawtherapee.com

Rawtherapee is a <a class="zem_slink freebase/en/raw_image_format" title="Raw image format" rel="wikipedia" href="http://en.wikipedia.org/wiki/Raw_image_format">RAW image processing software. It gives full control over many parameters to enhance the raw picture before finally exporting it to some common <a class="zem_slink freebase/en/image_processing" title="Image processing" rel="wikipedia" href="http://en.wikipedia.org/wiki/Image_processing">image format.

Continue reading

Mod your gnome desktop, change the colors the easy way.

2010-06-25 1 min read Fedora GNOME

Install the autoten application. You can find the instructions in my earlier post today <a href="http://blog.amit-agarwal.co.in/2009/04/20/autoten-install-nvidia-gnome-color-chooser-and-many-others-in-one-click-on-fedora/">here.

Gnome color chooser is an application to allow you to change the color of your gnome DE in all aspects. Very easy to use GUI. Just install it and run it as gnome-color-chooser. Here&#8217;s a screenshot of the application.

<img class="size-full wp-image-751" title="Gnome Color Chooser" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/gnomecolorchooser.jpg" alt="Gnome Color Chooser" width="346" height="445" />

The beauty of this application is that it allows to use XML files as input so there are lot of possibilities. And one of the most lucarat5ive ones is to download a pack of color schemes from <a href="http://gnome-look.org/CONTENT/content-files/84941-daX_UltraPack220_3v2_gnomecc.tar.bz2">here.  This has 220 theme colors to select from in the form of XML files which can be used directly with Gnome Color Chooser. So enjoy.

Continue reading
Older posts Newer posts