glances – Get a glimpse of the whole system

2012-02-21 1 min read Fedora
You would have used top at some point of time. Did you not wish that instead of just the processes it list all the vital statistics of the system as a whole. How good it would be to see the Memory, Net, Processes and Disk usage on the same screen. Well then you should take a look at glances. Here is how it looks: [][1]glances For using this tool, here is what you need to do : Continue reading

Installing Full Blin g theme on N900

2011-08-03 1 min read Maemo N900
I was going through the post : http://talk.maemo.org/showthread.php?t=46739 and found the theme quite intruging but not complete to the point where I can download the deb file and install it in /usr/share/theme/ dir with simple commands “apt-get” or at max just use mkdir command to create the dir and dump everything in that dir. So, I wrote this couple of bash one liners to copy the required files to my N900. Continue reading

bash regular expressions

2011-02-06 1 min read bash
Here are some quick links on bash regular expressions, pretty good links to bookmark, if you use, regular expressions in bash regularly. I especially like the tldp link at number 3. http://www.linuxjournal.com/content/bash-regular-expressions http://www.ibm.com/developerworks/library/l-bash.html http://tldp.org/LDP/abs/html/parameter-substitution.html#VARMATCH http://wellington.pm.org/archive/200005/codegen/index9.htm Related articles Renaming a whole bunch of files at once, in bash (ask.metafilter.com) bash math (amit-agarwal.co.in) Efficiency of regular expressions (johndcook.com) Autogenerate Regular Expressions with txt2re (readwriteweb.com)

Ranking of the most frequently used commands

2011-01-31 2 min read Linux Uncategorized
Lets take a quick look at how to get the most frequently used commands on you shell. So what we need to do is this: 1 <td> <div class="text codecolorer"> history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -n | tail | sort -nr </div> </td> </tr> So, how did we arrive at this and will this always work? No it might not always work. Continue reading

fork a new process in perl

2011-01-27 1 min read Uncategorized
I was doing something today and found that I require to fork a new process in perl. Now I had never done this earlier, so I did not know how to do this. First some background : I was doing some program very similar to http server, where the script accepts some input through a socket and then processes the same. In doing so I was seeing that the script was taking some time in processing the input and thus was not processing the second request until the first one was completed. Continue reading

Bash Script Beautifier

2010-12-23 1 min read bash Learning Linux
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"> Image via <a href="http://en.wikipedia.org/wiki/File:Bash-org.png">Wikipedia</a> </dd> </dl> Today I was working on a bash script written by someone else. And the script was maintained since long and had actually become quite big and there was no indentation followed. So, you can understand how difficult it was to understand the script. So, I set my foot forth to first find a beautifier for the bash script before I fixed it and my search ended here. Continue reading

cURL – Tutorial

2010-09-15 1 min read bash Fedora Linux
Here are linkw to two nice tutorials on curl and how to use curl to login before we try to fetch a page. Hope you find them useful. http://curl.haxx.se/docs/httpscripting.html http://www.youtube.com/watch?v=XcgQUsorF_8 http://scriptasy.com/php_11/tutorial-curl-login_44.html Related articles by Zemanta {."zemanta-related-title"} How To Display Just The HTTP Response Code In CLI Curl (beerpla.net)
Older posts Newer posts