<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8654658029836947514</id><updated>2011-11-17T16:45:28.467+05:30</updated><category term='uname'/><category term='logging'/><category term='ctrl'/><category term='nohup'/><category term='bug'/><category term='free'/><category term='combine'/><category term='apt-get'/><category term='mencoder'/><category term='psql'/><category term='query'/><category term='pgsql'/><category term='webserver'/><category term='awk'/><category term='configuration'/><category term='player'/><category term='mod_deflate'/><category term='deflate'/><category term='redirect'/><category term='ctid'/><category term='solaris'/><category term='patch'/><category term='scripting'/><category term='attack'/><category term='web-rippers'/><category term='java'/><category term='discarding'/><category term='battery'/><category term='memory'/><category term='diff'/><category term='networking'/><category term='samples'/><category term='output'/><category term='socket'/><category term='getconf'/><category term='loadtest'/><category term='shellscripts'/><category term='gawk'/><category term='power'/><category term='deny'/><category term='perfomance'/><category term='ubuntu'/><category term='CVE-2010-4476'/><category term='vmstat'/><category term='svn'/><category term='dependencies'/><category term='subversion'/><category term='mail'/><category term='tcpdump'/><category term='smtp'/><category term='perl'/><category term='locale'/><category term='recursive'/><category term='seq'/><category term='dump'/><category term='signal'/><category term='command'/><category term='Xssh'/><category term='controlcharacters'/><category term='httpd.conf'/><category term='invalid'/><category term='sound'/><category term='shell'/><category term='start'/><category term='threaddump'/><category term='subverion'/><category term='slave'/><category term='image'/><category term='PDT'/><category term='if'/><category term='touch'/><category term='repository'/><category term='intall'/><category term='alias'/><category term='zenity'/><category term='screen'/><category term='netstat'/><category term='localtime'/><category term='processor'/><category term='remote'/><category term='program'/><category term='ssh'/><category term='join'/><category term='thread'/><category term='replace'/><category term='regex'/><category term='totem'/><category term='sql'/><category term='cont'/><category term='log'/><category term='listen'/><category term='server'/><category term='vpn'/><category term='postgress'/><category term='master'/><category term='DOS'/><category term='install'/><category term='visual'/><category term='block'/><category term='requests'/><category term='characters'/><category term='C'/><category term='ram'/><category term='settings'/><category term='date'/><category term='dvd'/><category term='library'/><category term='sum'/><category term='firefox'/><category term='values'/><category term='queries'/><category term='yum'/><category term='metatags'/><category term='grep'/><category term='performance'/><category term='eclipse'/><category term='SIGNALS'/><category term='xml'/><category term='certificates'/><category term='forward'/><category term='stop'/><category term='gdm'/><category term='ignore'/><category term='mysql'/><category term='heap'/><category term='jre'/><category term='httpd'/><category term='jrebug'/><category term='robots'/><category term='openedport'/><category term='bash'/><category term='thumbnail'/><category term='compile'/><category term='user'/><category term='max'/><category term='split'/><category term='editor'/><category term='timezone'/><category term='photo'/><category term='d2'/><category term='ssl'/><category term='Xforwarding'/><category term='IfDefine'/><category term='testing'/><category term='plugins'/><category term='egrep'/><category term='remove'/><category term='cert'/><category term='url'/><category term='media'/><category term='enable'/><category term='extract'/><category term='grub'/><category term='songs'/><category term='stat'/><category term='CRTL + C'/><category term='xserver'/><category term='gc'/><category term='svnsync'/><category term='classpath'/><category term='cowon'/><category term='http'/><category term='xml-rpc'/><category term='MAC'/><category term='tabstop'/><category term='Lockness'/><category term='find'/><category term='delete'/><category term='commands'/><category term='address'/><category term='analysis'/><category term='python'/><category term='else'/><category term='ldd'/><category term='avi'/><category term='telnet'/><category term='script'/><category term='windows'/><category term='crawler'/><category term='port'/><category term='timestamp'/><category term='csv'/><category term='file'/><category term='database'/><category term='bots'/><category term='linux'/><category term='apache'/><category term='debug'/><category term='hibernate'/><category term='spiders'/><category term='PROCESS'/><category term='soap'/><category term='vi'/><category term='schellscript'/><category term='stress'/><category term='convert'/><category term='nmap'/><category term='lucene'/><category term='FDUpdater'/><category term='james'/><category term='config'/><category term='X'/><category term='time'/><category term='min'/><category term='tcp'/><category term='combining'/><category term='terminal'/><category term='shared'/><category term='jboss'/><category term='search'/><category term='bedugging'/><category term='csplit'/><category term='iptables'/><category term='deadlock'/><category term='boolean'/><category term='password'/><category term='PID'/><category term='db'/><title type='text'>Open Tech archive</title><subtitle type='html'>Sharing what I know!!!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>93</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2073759375773140159</id><published>2011-02-11T01:37:00.001+05:30</published><updated>2011-02-11T01:59:14.851+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DOS'/><category scheme='http://www.blogger.com/atom/ns#' term='jrebug'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='attack'/><category scheme='http://www.blogger.com/atom/ns#' term='CVE-2010-4476'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='FDUpdater'/><category scheme='http://www.blogger.com/atom/ns#' term='jre'/><title type='text'>DoS vulnerability in all java servers that was just published in CVE-2010-4476</title><content type='html'>Oracle has given a fix for this &lt;a href="http://www.oracle.com/technetwork/java/javase/fpupdater-tool-readme-305936.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Tested this bug on my jboss server and watched the increasing cpu utilization. Excited about this as I've started looking vmstat and top command outputs after yesterday's learnings about them which reports these performance details.&lt;br /&gt;&lt;br /&gt;Here is the initial "vmstat 2" output when plain jboss process is running. You can see the 'us' column doesn't go beyond 6. 'us' columns is nothing but the time spent running non-kernel code which reflects to cpu utilization.&lt;br /&gt;&lt;br /&gt;[prakash@cu255 CTF5.4.1]$ vmstat 2&lt;br /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------&lt;br /&gt;r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st&lt;br /&gt;1  0  68444 168692 243820 747388    0    1     4    36   19    4  1  1 99  0  0&lt;br /&gt;0  0  68444 168692 243820 747388    0    0     0     0 1113  561  0  0 100  0  0&lt;br /&gt;1  0  68444 168692 243820 747388    0    0     0     0 1107  559  0  0 100  0  0&lt;br /&gt;1  0  68444 162988 243820 747388    0    0     0    68 1115  528 33  2 65  0  0&lt;br /&gt;0  0  68444 162988 243820 747388    0    0     0     0 1112  567  0  1 99  0  0&lt;br /&gt;0  0  68444 162864 243820 747392    0    0     0    92 1117  563  0  0 99  0  0&lt;br /&gt;0  0  68444 162864 243820 747392    0    0     0    98 1125  553  0  0 100  0  0&lt;br /&gt;0  0  68444 162864 243820 747392    0    0     0     0 1115  575  0  1 98  0  0&lt;br /&gt;0  0  68444 162864 243820 747392    0    0     0    60 1108  552  0  0 100  0  0&lt;br /&gt;0  0  68444 162864 243820 747392    0    0     0     0 1120  575  0  0 100  0  0&lt;br /&gt;0  0  68444 162864 243820 747392    0    0     0    60 1107  551  0  1 99  0  0&lt;br /&gt;1  0  68444 162864 243820 747392    0    0     0    14 1120  570  0  0 100  0  0&lt;br /&gt;1  0  68444 162864 243820 747392    0    0     0     0 1112  558  0  0 99  0  0&lt;br /&gt;0  0  68444 162864 243824 747392    0    0     0    76 1109  561  0  1 99  0  0&lt;br /&gt;0  0  68444 162864 243824 747392    0    0     0     0 1116  580  0  0 100  0  0&lt;br /&gt;0  0  68444 162864 243824 747392    0    0     0    68 1113  562  0  0 100  0  0&lt;br /&gt;0  0  68444 162864 243824 747392    0    0     0     6 1122  582  0  1 99  0  0&lt;br /&gt;0  0  68444 162864 243824 747392    0    0     0     0 1102  541  0  0 100  0  0&lt;br /&gt;1  0  68444 162484 243824 747392    0    0     0    86 1120  725  2  2 96  0  0&lt;br /&gt;0  0  68444 162484 243824 747392    0    0     0     0 1108  570  0  0 100  0  0&lt;br /&gt;0  0  68444 162484 243824 747392    0    0     0    72 1109  562  0  0 100  0  0&lt;br /&gt;0  0  68444 162484 243824 747392    0    0     0     0 1120  576  0  1 99  0  0&lt;br /&gt;0  0  68444 162484 243824 747428    0    0     0    16 1107  555  0  0 100  0  0&lt;br /&gt;0  0  68444 161864 243824 747432    0    0     0   510 1187  657  6  5 89  0  0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now I issue the DoS vulnerability command in another terminal using curl.&lt;br /&gt;&lt;br /&gt;curl -H "Accept-Language: en-us;q=2.2250738585072012e-308" http://${HTTP_HOST}/requested_page&lt;br /&gt;&lt;br /&gt;Here you can see, how much the 'us' column increased, it utilized to 100%. This makes my cpu % worst.&lt;br /&gt;&lt;br /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------&lt;br /&gt;r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st&lt;br /&gt;2  0  68444 161740 243856 747508    0    0     0    80 1108  592 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747508    0    0     0     0 1102  579 98  2  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747508    0    0     0     0 1108  569 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747508    0    0     0    60 1103  571 98  2  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747508    0    0     0     0 1108  571 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747512    0    0     0    94 1107  595 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747512    0    0     0    48 1085  544 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747512    0    0     0     8 1111  639 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747516    0    0     0    92 1102  541 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747516    0    0     0     0 1114  577 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243856 747520    0    0     0    36 1116  596 98  2  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747528    0    0     0   124 1106  578 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747528    0    0     0     0 1107  585 98  2  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747528    0    0     0    72 1100  569 99  1  0  0  0&lt;br /&gt;2  0  68444 161740 243860 747528    0    0     0     0 1112  591 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747528    0    0     0     0 1101  576 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747532    0    0     0    86 1119  575 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747532    0    0     0     0 1102  561 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747532    0    0     0    82 1109  578 99  1  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747532    0    0     0     0 1108  574 98  2  0  0  0&lt;br /&gt;1  0  68444 161740 243860 747532    0    0     0     0 1099  589 100  0  0  0  0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also the top command:&lt;br /&gt;&lt;br /&gt;top - 11:58:41 up 17 days, 15 min,  4 users,  load average: 1.05, 1.09, 1.00&lt;br /&gt;Tasks: 123 total,   3 running, 119 sleeping,   0 stopped,   1 zombie&lt;br /&gt;Cpu(s): 98.7%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st&lt;br /&gt;Mem:   2059588k total,  1936104k used,   123484k free,   244512k buffers&lt;br /&gt;Swap:  2096472k total,    68432k used,  2028040k free,   760124k cached&lt;br /&gt;&lt;br /&gt;PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                         &lt;br /&gt;28975 prakash   21   0 1428m 528m  16m S 99.9 26.3  20:59.60 /usr/java/jdk1.6.0_18//bin/java -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -server -XX:+HeapDumpOn&lt;br /&gt;29768 prakash   21   0  506m  77m 9100 S  0.3  3.8   0:03.08 /usr/java/jdk1.6.0_18//bin/java -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -server -XX:+HeapDumpOn&lt;br /&gt;10063 prakash   15   0  123m 2812 1648 S  0.0  0.1   0:00.20 /usr/sbin/httpd&lt;br /&gt;&lt;br /&gt;You can see the %CPU of my jboss server box went up to 99.9%. So, it's good to have this patch in the jre versions which the server use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2073759375773140159?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2073759375773140159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2073759375773140159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2073759375773140159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2073759375773140159'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/02/dos-vulnerability-in-all-java-servers.html' title='DoS vulnerability in all java servers that was just published in CVE-2010-4476'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3322386975191392238</id><published>2011-02-10T04:46:00.000+05:30</published><updated>2011-02-10T04:46:26.376+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='netstat'/><title type='text'>Netstat analysis for outgoing/incoming connections</title><content type='html'>netstat supports a set of options to display active or passive sockets. The options –t, –u, –w, and –x show active TCP, UDP, RAW, or Unix socket connections. If you provide the –a flag in addition, sockets that are waiting for a connection (i.e., listening) are displayed as well. This display will give you a list of all servers that are currently running on your system.&lt;br /&gt;&lt;br /&gt;Invoking netstat -ta on vlager produces this output:&lt;br /&gt;&lt;br /&gt;$ netstat -ta (you can also use -n option to avoid the dns lookup for displaying domain names, which will save performace).&lt;br /&gt;&lt;br /&gt;Active Internet Connections&lt;br /&gt;Proto Recv-Q Send-Q Local Address    Foreign Address    (State)&lt;br /&gt;tcp        0      0 *:domain         *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:time           *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:smtp           *:*                LISTEN  &lt;br /&gt;tcp        0      0 vlager:smtp      vstout:1040        ESTABLISHED  &lt;br /&gt;tcp        0      0 *:telnet         *:*                LISTEN  &lt;br /&gt;tcp        0      0 localhost:1046   vbardolino:telnet  ESTABLISHED  &lt;br /&gt;tcp        0      0 *:chargen        *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:daytime        *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:discard        *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:echo           *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:shell          *:*                LISTEN  &lt;br /&gt;tcp        0      0 *:login          *:*                LISTEN  &lt;br /&gt;&lt;br /&gt;This output shows most servers simply waiting for an incoming connection. However, the fourth line shows an incoming SMTP connection from vstout, and the sixth line tells you there is an outgoing telnet connection to vbardolino.[1]&lt;br /&gt;&lt;br /&gt;Using the –a flag by itself will display all sockets from all families.&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;[1] &lt;br /&gt;&lt;br /&gt;You can tell whether a connection is outgoing from the port numbers. The port number shown for the calling host will always be a simple integer. On the host being called, a well-known service port will be in use for which netstat uses the symbolic name such as smtp, found in /etc/services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3322386975191392238?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3322386975191392238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3322386975191392238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3322386975191392238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3322386975191392238'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/02/netstat-analysis-for-outgoingincoming.html' title='Netstat analysis for outgoing/incoming connections'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4276005810169431697</id><published>2011-02-10T03:36:00.000+05:30</published><updated>2011-02-10T03:36:38.922+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='vmstat'/><title type='text'>Using vmstat for virtutal memory analyze</title><content type='html'>vmstat, as its name suggests, reports virtual memory statistics. It shows how much virtual memory there is, how much is free and paging activity. Most important, you can observe page-ins and page-outs as they happen. This is extremely useful.&lt;br /&gt;&lt;br /&gt;To monitor the virtual memory activity on your system, it's best to use vmstat with a delay. A delay is the number of seconds between updates. If you don't supply a delay, vmstat reports the averages since the last boot and quit. Five seconds is the recommended delay interval.&lt;br /&gt;&lt;br /&gt;To run vmstat with a five-second delay, type:&lt;br /&gt;&lt;br /&gt;vmstat 5&lt;br /&gt;&lt;br /&gt;You also can specify a count, which indicates how many updates you want to see before vmstat quits. If you don't specify a count, the count defaults to infinity, but you can stop output with Ctrl-C.&lt;br /&gt;&lt;br /&gt;To run vmstat with ten updates, five seconds apart, type:&lt;br /&gt;&lt;br /&gt;vmstat 5 10&lt;br /&gt;&lt;br /&gt;Here's an example of a system free of paging activity:&lt;br /&gt;&lt;br /&gt;  procs                     memory    swap        io     system cpu&lt;br /&gt;r  b  w   swpd   free  buff  cache  si so   bi  bo   in    cs us sy  id&lt;br /&gt;0  0  0  29232 116972  4524 244900   0  0    0   0    0     0 0   0   0&lt;br /&gt;0  0  0  29232 116972  4524 244900   0  0    0   0 2560     6 0   1  99&lt;br /&gt;0  0  0  29232 116972  4524 244900   0  0    0   0 2574    10 0   2  98&lt;br /&gt;&lt;br /&gt;All fields are explained in the vmstat man page, but the most important columns for this article are free, si and so. The free column shows the amount of free memory, si shows page-ins and so shows page-outs. In this example, the so column is zero consistently, indicating there are no page-outs.&lt;br /&gt;&lt;br /&gt;The abbreviations so and si are used instead of the more accurate po and pi for historical reasons.&lt;br /&gt;&lt;br /&gt;Here's an example of a system with paging activity:&lt;br /&gt;&lt;br /&gt;  procs          memory             swap      io       system  --- cpu ---&lt;br /&gt;r  b  w   swpd   free  buff cache  si  so   bi   bo   in    cs us  sy  id&lt;br /&gt;. . .&lt;br /&gt;1  0  0  13344   1444  1308 19692   0 168  129   42 1505   713 20  11  69&lt;br /&gt;1  0  0  13856   1640  1308 18524  64 516  379  129 4341   646 24  34  42&lt;br /&gt;3  0  0  13856   1084  1308 18316  56  64   14    0  320  1022 84   9   8&lt;br /&gt;&lt;br /&gt;Notice the nonzero so values indicating there is not enough physical memory and the kernel is paging out. You can use top and ps to identify the processes that are using the most memory.&lt;br /&gt;&lt;br /&gt;You also can use top to show memory and swap statistics. Here is an example of the uppermost portion of a typical top report:&lt;br /&gt;&lt;br /&gt;14:23:19 up 348 days,  3:02,  1 user,  load average: 0.00, 0.00, 0.00&lt;br /&gt;55 processes: 54 sleeping, 1 running, 0 zombie, 0 stopped&lt;br /&gt;CPU states:   0.0% user,   2.4% system,   0.0% nice,  97.6% idle&lt;br /&gt;Mem:    481076K total,   367508K used,   113568K free,     4712K buffers&lt;br /&gt;Swap:  1004052K total,    29852K used,   974200K free,   244396K cached&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4276005810169431697?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4276005810169431697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4276005810169431697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4276005810169431697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4276005810169431697'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/02/using-vmstat-for-virtutal-memory.html' title='Using vmstat for virtutal memory analyze'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3612137212494435716</id><published>2011-02-10T02:21:00.001+05:30</published><updated>2011-02-11T02:00:57.590+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='free'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='ram'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Linux Free Command (Analysing RAM utilization)</title><content type='html'>I was reading these and thought sharing them will be a useful.&lt;br /&gt;&lt;br /&gt;The linux free command allows us to check free/used memory on the system The output below is the result of running free -m on my system (-m means output is in MB):&lt;br /&gt;&lt;br /&gt;total       used       free     shared    buffers     cached&lt;br /&gt;Mem:          3856       1121       2735          0         17        180&lt;br /&gt;-/+ buffers/cache:        923       2933&lt;br /&gt;Swap:         2533       1044       1489&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Output explained&lt;br /&gt;&lt;br /&gt;The first line starting with Mem: gives us the following information:&lt;br /&gt;&lt;br /&gt;* total - is the total avaialble RAM (== Physical Memory) after subtracting the amount used by the kernel! In my case I have 4GB RAM and the total displays less than this.&lt;br /&gt;* used - is the part of the RAM that currently has information in it that can be of use to the system (remember: unused RAM is useless, try to maximise this value)&lt;br /&gt;* free - is just total-used&lt;br /&gt;* shared - is the amount of memory shared between processes&lt;br /&gt;* buffers and cached - the cached data and buffers for IO &lt;br /&gt;&lt;br /&gt;The second line starting with -/+ buffers/cache: tells us how much of the memory in the buffers/cache is used by the applications and how much is free. Keep in mind that in general the cache is filled with disk IO cached data. The cache can be very easily reclaimed by the OS for applications. Let BUFFERS + CACHED from first line be value X.&lt;br /&gt;&lt;br /&gt;X subtracted from the USED memory from the first line gives how much RAM is used by applications (USED value on second line)&lt;br /&gt;&lt;br /&gt;X added to the FREE memory on the first line gives how much RAM applications can still request from the OS.&lt;br /&gt;&lt;br /&gt;While the first line handles the values of currently used RAM, including applications and caches (but excluding kernel), the second line gives info on application related memory: how much is currently in use and how much is there still available for the applications.&lt;br /&gt;&lt;br /&gt;You can find more info &lt;a href="http://salomie.ro/wiki/index.php/Linux_Free_Command"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3612137212494435716?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3612137212494435716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3612137212494435716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3612137212494435716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3612137212494435716'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/02/linux-free-command-analysing-ram.html' title='Linux Free Command (Analysing RAM utilization)'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-7192914363685937241</id><published>2011-02-09T07:11:00.000+05:30</published><updated>2011-02-09T07:11:59.653+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='find'/><category scheme='http://www.blogger.com/atom/ns#' term='grep'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>Using Find output and making a grep on it</title><content type='html'>Some times, we may be in situation to find the list of files in a recursive directory and search for a specific contents in it.&lt;br /&gt;&lt;br /&gt;Below is the command which does that. In below command I'm trying to find commons-beanutils.jar recursive in a directory and a grep command on the listed files to actually find do the jar files has class file 'BeanUtilsBean.class in it.&lt;br /&gt;&lt;br /&gt;find . -name *beanutils*.jar -exec grep 'BeanUtilsBean.class' '{}' \;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-7192914363685937241?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/7192914363685937241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=7192914363685937241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7192914363685937241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7192914363685937241'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/02/using-find-output-and-making-grep-on-it.html' title='Using Find output and making a grep on it'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-8661329673386699021</id><published>2011-02-09T07:06:00.000+05:30</published><updated>2011-02-09T07:06:47.408+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='timestamp'/><category scheme='http://www.blogger.com/atom/ns#' term='touch'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='stat'/><title type='text'>How to view and change the timestamp of a file say creation date</title><content type='html'>'stat' command will give the last-accessed/last-modified/file-created date with timestamps in it.&lt;br /&gt;&lt;br /&gt;[prakashc@cu120 jbossweb-tomcat50.sar]$ stat commons-beanutils-1.8.0.jar &lt;br /&gt;  File: `commons-beanutils-1.8.0.jar'&lt;br /&gt;  Size: 231320     Blocks: 464        IO Block: 4096   regular file&lt;br /&gt;Device: 303h/771d Inode: 6547316     Links: 1&lt;br /&gt;Access: (0700/-rwx------)  Uid: ( 7069/prakashc)   Gid: ( 4001/__cubitu)&lt;br /&gt;Access: 2011-02-09 07:01:55.000000000 +0530&lt;br /&gt;Modify: 2011-02-09 05:50:40.000000000 +0530&lt;br /&gt;Change: 2011-02-09 06:12:08.000000000 +0530&lt;br /&gt;&lt;br /&gt;using 'touch' command you can modify the date created&lt;br /&gt;&lt;br /&gt;touch commons-beanutils-1.8.0.jar -t [[CC]YY]MMDDhhmm [.SS]&lt;br /&gt;&lt;br /&gt;MM - The month of the year [01-12].&lt;br /&gt;DD - The day of the month [01-31].&lt;br /&gt;hh - The hour of the day [00-23].&lt;br /&gt;mm - The minute of the hour [00-59].&lt;br /&gt;CC - The first two digits of the year.&lt;br /&gt;YY - The second two digits of the year.&lt;br /&gt;SS - The second of the minute [00-61].&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-8661329673386699021?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/8661329673386699021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=8661329673386699021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8661329673386699021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8661329673386699021'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/02/how-to-view-and-change-timestamp-of.html' title='How to view and change the timestamp of a file say creation date'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4731291936717553604</id><published>2011-01-12T04:14:00.000+05:30</published><updated>2011-01-12T04:14:00.170+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='remove'/><category scheme='http://www.blogger.com/atom/ns#' term='ctid'/><category scheme='http://www.blogger.com/atom/ns#' term='postgress'/><title type='text'>Remove duplicate rows from postgress using ctid</title><content type='html'>Today, I was in a situation to delete the duplicate row entries in a table which has all the column values similar including the unique constraints too.&lt;br /&gt;&lt;br /&gt;I'm not sure how the table accepted the unique constraints of same value, it's been an large dataset and I guess some could've gone wrong on migration or some thing else.&lt;br /&gt;&lt;br /&gt;While trying to reindex the table it failed stating &lt;br /&gt;&lt;br /&gt;&gt;&gt;&lt;br /&gt;&lt;br /&gt;reindexdb: reindexing of database "testdb" failed: ERROR:  could not create unique index "folder_pk"&lt;br /&gt;&lt;br /&gt;DETAIL:  Table contains duplicated values.&lt;br /&gt;&lt;br /&gt;&lt;&lt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After trying to remove the duplicate values, I found all the columns values are similar including the primary keys,&lt;br /&gt;&lt;br /&gt;So finally got an idea from one forum, which suggests to  use the "ctid" of the rows to delete that.&lt;br /&gt;&lt;br /&gt;It looks, for the table rows, internally there is ctid and you can view it using &lt;br /&gt;&lt;br /&gt;select ctid, id from table;&lt;br /&gt;&lt;br /&gt;Then, remove the specific rows which you need using the ctid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4731291936717553604?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4731291936717553604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4731291936717553604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4731291936717553604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4731291936717553604'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2011/01/remove-duplicate-rows-from-postgress.html' title='Remove duplicate rows from postgress using ctid'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-7275640372537475530</id><published>2010-10-26T12:31:00.000+05:30</published><updated>2010-10-26T12:31:04.979+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='threaddump'/><category scheme='http://www.blogger.com/atom/ns#' term='plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Lockness'/><title type='text'>"Lockness" eclipse thread dump analysis plugin</title><content type='html'>There is a eclipse plugin "Lockness" for thread dump analysis (http://lockness.plugin.free.fr/setup.php). Using this we can analyze the thread locks to diagonalize the problems. To download (http://lockness.plugin.free.fr/archive/com.cr.lockness.Lockness_3.0.0.jar), put this jar to eclipse3.x/plugins dir and restart eclipse.&lt;br /&gt;&lt;br /&gt;How to take a thread dump:&lt;br /&gt;&lt;br /&gt;Sending "kill -3 signal to the JBOSS/TOMCAT process" will give you the whole thread dump. Ex: kill -3 #### -&gt; process id.&lt;br /&gt;&lt;br /&gt;After executing the above command, you can find thread dump in catalina.out for tomcat or server.log for jboss.&lt;br /&gt;&lt;br /&gt;You've to trim the thread dump contents exactly from above log files, such that the dump file starts with "Full thread dump" and end with "VM Thread".&lt;br /&gt;&lt;br /&gt;Also, if you have some timestamps added in thread dump, you can trim that using below cut command. For ex: say each line has some time stamps added like "2010-10-25 13:29:23 PDT", then to skip the first 3 columns. Use below command&lt;br /&gt;&lt;br /&gt;cat threaddump.txt | cut -d " " -f4- &gt; cut_file_threaddump.txt&lt;br /&gt;&lt;br /&gt;The above command will skip first 3 columns and saves rest of the columns what we needed to cut_file_threaddump.txt.&lt;br /&gt;&lt;br /&gt;Then from eclipse, create a new java project, create folder pointing to above create dump dir and opening this using "Lockness" thread dump analyser plugin will give you the analysis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-7275640372537475530?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/7275640372537475530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=7275640372537475530' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7275640372537475530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7275640372537475530'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/10/lockness-eclipse-thread-dump-analysis.html' title='&quot;Lockness&quot; eclipse thread dump analysis plugin'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2881629251550229937</id><published>2010-08-19T15:12:00.000+05:30</published><updated>2010-08-19T15:12:10.477+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='smtp'/><category scheme='http://www.blogger.com/atom/ns#' term='port'/><category scheme='http://www.blogger.com/atom/ns#' term='iptables'/><category scheme='http://www.blogger.com/atom/ns#' term='forward'/><category scheme='http://www.blogger.com/atom/ns#' term='james'/><title type='text'>How to redirect ports inside same machine using IPTABLES</title><content type='html'>As my mail server is running on port 8056, I got ended up searching to find a way to redirect all the mails which comes to port25 to port8056.&lt;br /&gt;&lt;br /&gt;Below is one way of doing which helped me using iptables entry.&lt;br /&gt;&lt;br /&gt;&lt;snippet&gt;&lt;br /&gt;sudo iptables -t nat -A OUTPUT -p tcp -d 127.0.0.0/8 --dport 25 -j REDIRECT --to-port 8056&lt;br /&gt;sudo iptables -t nat -A OUTPUT -p tcp -d x.x.x.x --dport 25 -j REDIRECT --to-port 8056&lt;br /&gt;sudo iptables -t nat -A PREROUTING -p tcp --dport 25 -j REDIRECT --to-ports 8056&lt;br /&gt;&lt;/snippet&gt;&lt;br /&gt;&lt;br /&gt;In the above commands&lt;br /&gt;&lt;br /&gt;command 1 is to, forward port25 requests to port 8056 which are initiated via localhost. (i.e) telnet localhost 25.&lt;br /&gt;command 2 is to, forward port25 requests to port 8056 which are initiated via IP address. (i.e) telnet x.x.x.x 25.&lt;br /&gt;command 3 is to, forward the other network m/c requests to port 8056 through port25.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2881629251550229937?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2881629251550229937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2881629251550229937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2881629251550229937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2881629251550229937'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/08/how-to-redirect-ports-inside-same.html' title='How to redirect ports inside same machine using IPTABLES'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4899996012136002754</id><published>2010-07-14T18:22:00.000+05:30</published><updated>2010-07-14T18:22:01.332+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='soap'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Soap calls using perl</title><content type='html'>This seems to be the quick way for testing soap api's.&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;#use SOAP::Lite +trace =&gt; debug;&lt;br /&gt;use TeamForge;&lt;br /&gt;use Data::Dumper;&lt;br /&gt;&lt;br /&gt;my($tf,$sk);&lt;br /&gt;&lt;br /&gt;$tf = new TeamForge;&lt;br /&gt;$tf-&gt;proxy('http://cu021.cubit.maa.collab.net');&lt;br /&gt;$sk = $tf-&gt;loginAnonymous("guestuser");&lt;br /&gt;&lt;br /&gt;die "Login failed" unless ($sk);&lt;br /&gt;&lt;br /&gt;print Dumper($tf-&gt;getProjectData($sk,'proj1007'));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4899996012136002754?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4899996012136002754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4899996012136002754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4899996012136002754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4899996012136002754'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/07/soap-calls-using-perl.html' title='Soap calls using perl'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2072785276014135689</id><published>2010-06-10T16:24:00.000+05:30</published><updated>2010-06-10T16:25:27.137+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='boolean'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='values'/><title type='text'>Boolean values</title><content type='html'>0 - FALSE&lt;br /&gt;1 - TRUE&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2072785276014135689?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2072785276014135689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2072785276014135689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2072785276014135689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2072785276014135689'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/06/boolean-values.html' title='Boolean values'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-803211210052133196</id><published>2010-05-03T11:20:00.000+05:30</published><updated>2010-05-03T11:21:27.684+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><category scheme='http://www.blogger.com/atom/ns#' term='cert'/><category scheme='http://www.blogger.com/atom/ns#' term='certificates'/><title type='text'>Verfity certificate validity</title><content type='html'>openssl x509 -in server.crt -text|less&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-803211210052133196?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/803211210052133196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=803211210052133196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/803211210052133196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/803211210052133196'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/05/verfity-certificate-validity.html' title='Verfity certificate validity'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5849280470687998909</id><published>2010-05-03T11:17:00.002+05:30</published><updated>2010-05-03T11:31:33.028+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='egrep'/><title type='text'>egrep command</title><content type='html'>egrep "28[u,w]|29[u,w]" /tmp/31752_lsof&lt;br /&gt;&lt;br /&gt;egrep "(PROPFIND|OPTIONS)" | awk '{if ($6 &gt; 60) print }'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5849280470687998909?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5849280470687998909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5849280470687998909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5849280470687998909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5849280470687998909'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/05/egrep-command.html' title='egrep command'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5465014403678317932</id><published>2010-04-21T11:56:00.000+05:30</published><updated>2010-04-21T11:57:23.180+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mail'/><title type='text'>Sending mail as different user</title><content type='html'># telnet localhost 25&lt;br /&gt;Trying 127.0.0.1...&lt;br /&gt;Connected to localhost.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;220 hostname SMTP Server (JAMES SMTP Server 2.2.0) ready Mon, 20 Feb 2006 14:31:33 -0500 (EST)&lt;br /&gt;ehlo yourEmailAddressDomain.com&lt;br /&gt;250 hostname Hello yourEmailAddressDomain.com (hostname [127.0.0.1])&lt;br /&gt;mail from: &lt;morgan@yourEmailAddressDomain.com&gt;&lt;br /&gt;250 Sender &lt;morgan@yourEmailAddressDomain.com&gt; OK&lt;br /&gt;rcpt to: &lt;testuser@JAMESServerConfigSetting.com&gt;&lt;br /&gt;250 Recipient &lt;testuser@JAMESServersConfigSetting.com&gt; OK&lt;br /&gt;data&lt;br /&gt;354 Ok Send data ending with &lt;CRLF&gt;.&lt;CRLF&gt;&lt;br /&gt;subject: test to testuser at JAMESServersConfigSetting.com&lt;br /&gt;&lt;br /&gt;test&lt;br /&gt;&lt;br /&gt;.&lt;br /&gt;250 Message received&lt;br /&gt;quit&lt;br /&gt;221 hostname Service closing transmission channel&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5465014403678317932?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5465014403678317932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5465014403678317932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5465014403678317932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5465014403678317932'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/04/sending-mail-as-different-user.html' title='Sending mail as different user'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3627285722756367956</id><published>2010-02-27T16:13:00.002+05:30</published><updated>2010-02-27T16:13:37.978+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='psql'/><category scheme='http://www.blogger.com/atom/ns#' term='db'/><title type='text'>PostgreSQL Cheat Sheet</title><content type='html'>CREATE DATABASE&lt;br /&gt;&lt;br /&gt;CREATE DATABASE dbName;&lt;br /&gt;&lt;br /&gt;CREATE TABLE (with auto numbering integer id)&lt;br /&gt;&lt;br /&gt;CREATE TABLE tableName (&lt;br /&gt; id serial PRIMARY KEY,&lt;br /&gt; name varchar(50) UNIQUE NOT NULL,&lt;br /&gt; dateCreated timestamp DEFAULT current_timestamp&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;Add a primary key&lt;br /&gt;&lt;br /&gt;ALTER TABLE tableName ADD PRIMARY KEY (id);&lt;br /&gt;&lt;br /&gt;Create an INDEX&lt;br /&gt;&lt;br /&gt;CREATE UNIQUE INDEX indexName ON tableName (columnNames);&lt;br /&gt;&lt;br /&gt;Backup a database (command line)&lt;br /&gt;&lt;br /&gt;pg_dump dbName &gt; dbName.sql&lt;br /&gt;&lt;br /&gt;Backup all databases (command line)&lt;br /&gt;&lt;br /&gt;pg_dumpall &gt; pgbackup.sql&lt;br /&gt;&lt;br /&gt;Run a SQL script (command line)&lt;br /&gt;&lt;br /&gt;psql -f script.sql databaseName&lt;br /&gt;&lt;br /&gt;Search using a regular expression&lt;br /&gt;&lt;br /&gt;SELECT column FROM table WHERE column ~ 'foo.*';&lt;br /&gt;&lt;br /&gt;The first N records&lt;br /&gt;&lt;br /&gt;SELECT columns FROM table LIMIT 10;&lt;br /&gt;&lt;br /&gt;Pagination&lt;br /&gt;&lt;br /&gt;SELECT cols FROM table LIMIT 10 OFFSET 30;&lt;br /&gt;&lt;br /&gt;Prepared Statements&lt;br /&gt;&lt;br /&gt;PREPARE preparedInsert (int, varchar) AS&lt;br /&gt;  INSERT INTO tableName (intColumn, charColumn) VALUES ($1, $2);&lt;br /&gt;EXECUTE preparedInsert (1,'a');&lt;br /&gt;EXECUTE preparedInsert (2,'b');&lt;br /&gt;DEALLOCATE preparedInsert;&lt;br /&gt;&lt;br /&gt;Create a Function&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE FUNCTION month (timestamp) RETURNS integer &lt;br /&gt; AS 'SELECT date_part(''month'', $1)::integer;'&lt;br /&gt;LANGUAGE 'sql';&lt;br /&gt;&lt;br /&gt;Table Maintenance&lt;br /&gt;&lt;br /&gt;VACUUM ANALYZE table;&lt;br /&gt;&lt;br /&gt;Reindex a database, table or index&lt;br /&gt;&lt;br /&gt;REINDEX DATABASE dbName;&lt;br /&gt;&lt;br /&gt;Show query plan&lt;br /&gt;&lt;br /&gt;EXPLAIN SELECT * FROM table;&lt;br /&gt;&lt;br /&gt;Import from a file&lt;br /&gt;&lt;br /&gt;COPY destTable FROM '/tmp/somefile';&lt;br /&gt;&lt;br /&gt;Show all runtime parameters&lt;br /&gt;&lt;br /&gt;SHOW ALL;&lt;br /&gt;&lt;br /&gt;Grant all permissions to a user&lt;br /&gt;&lt;br /&gt;GRANT ALL PRIVILEGES ON table TO username;&lt;br /&gt;&lt;br /&gt;Perform a transaction&lt;br /&gt;&lt;br /&gt;BEGIN TRANSACTION &lt;br /&gt; UPDATE accounts SET balance += 50 WHERE id = 1;&lt;br /&gt;COMMIT;&lt;br /&gt;&lt;br /&gt;Basic SQL&lt;br /&gt;Get all columns and rows from a table&lt;br /&gt;&lt;br /&gt;SELECT * FROM table;&lt;br /&gt;&lt;br /&gt;Add a new row&lt;br /&gt;&lt;br /&gt;INSERT INTO table (column1,column2)&lt;br /&gt;VALUES (1, 'one');&lt;br /&gt;&lt;br /&gt;Update a row&lt;br /&gt;&lt;br /&gt;UPDATE table SET foo = 'bar' WHERE id = 1;&lt;br /&gt;&lt;br /&gt;Delete a row&lt;br /&gt;&lt;br /&gt;DELETE FROM table WHERE id = 1;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3627285722756367956?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3627285722756367956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3627285722756367956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3627285722756367956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3627285722756367956'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/02/blog-post.html' title='PostgreSQL Cheat Sheet'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4338844713609981916</id><published>2010-02-27T12:43:00.001+05:30</published><updated>2010-02-27T12:44:39.738+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='output'/><category scheme='http://www.blogger.com/atom/ns#' term='db'/><title type='text'>MYSQL query output to a file</title><content type='html'>select &lt;br /&gt;   *&lt;br /&gt;from &lt;br /&gt;   table&lt;br /&gt;where&lt;br /&gt;    condition&lt;br /&gt;into &lt;br /&gt;     outfile '/tmp/result'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4338844713609981916?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4338844713609981916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4338844713609981916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4338844713609981916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4338844713609981916'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/02/mysql-query-output-to-file.html' title='MYSQL query output to a file'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3205492535025297269</id><published>2010-02-18T15:49:00.001+05:30</published><updated>2010-02-18T15:52:14.144+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='block'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><category scheme='http://www.blogger.com/atom/ns#' term='deny'/><category scheme='http://www.blogger.com/atom/ns#' term='metatags'/><title type='text'>Using meta tags to block access to your site</title><content type='html'>To entirely prevent a page's contents from being listed in the Google web index even if other sites link to it, use a noindex meta tag. As long as Googlebot fetches the page, it will see the noindex meta tag and prevent that page from showing up in the web index. &lt;br /&gt;&lt;br /&gt;The noindex meta standard is described at http://www.robotstxt.org/meta.html. This method is useful if you don't have root access to your server, as it allows you to control access to your site on a page-by-page basis.&lt;br /&gt;&lt;br /&gt;To prevent all robots from indexing a page on your site, place the following meta tag into the &amp;lthead&amp;gt section of your page:&lt;br /&gt;&lt;br /&gt;&amp;ltmeta name="robots" content="noindex"&amp;gt&lt;br /&gt;&lt;br /&gt;To allow other robots to index the page on your site, preventing only Google's robots from indexing the page:&lt;br /&gt;&lt;br /&gt;&amp;ltmeta name="googlebot" content="noindex"&amp;gt&lt;br /&gt;&lt;br /&gt;When we see the noindex meta tag on a page, Google will completely drop the page from our search results, even if other pages link to it. Other search engines, however, may interpret this directive differently. As a result, a link to the page can still appear in their search results.&lt;br /&gt;&lt;br /&gt;Note that because we have to crawl your page in order to see the noindex meta tag, there's a small chance that Googlebot won't see and respect the noindex meta tag. If your page is still appearing in results, it's probably because we haven't crawled your site since you added the tag. (Also, if you've used your robots.txt file to block this page, we won't be able to see the tag either.)&lt;br /&gt;&lt;br /&gt;If the content is currently in our index, we will remove it after the next time we crawl it. To expedite removal, use the URL removal request tool in Google Webmaster Tools.&lt;br /&gt;&lt;br /&gt;Taken from: http://www.google.com/support/webmasters/bin/answer.py?answer=93710&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3205492535025297269?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3205492535025297269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3205492535025297269' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3205492535025297269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3205492535025297269'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/02/using-meta-tags-to-block-access-to-your.html' title='Using meta tags to block access to your site'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-811193064115332492</id><published>2010-02-18T14:01:00.002+05:30</published><updated>2010-02-18T15:15:02.780+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DOS'/><category scheme='http://www.blogger.com/atom/ns#' term='web-rippers'/><category scheme='http://www.blogger.com/atom/ns#' term='attack'/><category scheme='http://www.blogger.com/atom/ns#' term='crawler'/><category scheme='http://www.blogger.com/atom/ns#' term='spiders'/><category scheme='http://www.blogger.com/atom/ns#' term='bots'/><title type='text'>Preventing DOS attack</title><content type='html'>DOS attack is an attempt to make a computer resource unavailable to its intended users.&lt;br /&gt;&lt;br /&gt;In a public site, the usual vulnerability we see is a DOS attack. Most of the time it used to be a crawler/spiders/bots/web-rippers. What we do know to stop them from attacking our site is to block them by individual or range of IP at network level.&lt;br /&gt;&lt;br /&gt;Some spider/bots are intelligent enough to spoof IPs and so after some time, we again see a threat from them since they change their IP/IP range. &lt;br /&gt;&lt;br /&gt;One other way to stop such crawler/spiders/bots/web-rippers is to block them by using useragent control.&lt;br /&gt;&lt;br /&gt;#This was achieved using below snippet in httpd.conf&lt;br /&gt;&lt;br /&gt;----------------------------------------&lt;br /&gt;#Block access to robots&lt;br /&gt;BrowserMatch emailsiphon badrobot&lt;br /&gt;BrowserMatch BPFTP badrobot&lt;br /&gt;BrowserMatch MSIECrawler badrobot&lt;br /&gt;BrowserMatch WebStripper badrobot&lt;br /&gt;BrowserMatch Offline badrobot&lt;br /&gt;BrowserMatch Teleport badrobot&lt;br /&gt;BrowserMatch Alkaline badrobot&lt;br /&gt;BrowserMatch DLExpert badrobot&lt;br /&gt;BrowserMatch HTTrack badrobot&lt;br /&gt;BrowserMatch Controller badrobot&lt;br /&gt;&lt;br /&gt;&lt;Location /&gt;&lt;br /&gt;  deny from env=badrobot&lt;br /&gt;&lt;/Location&gt;&lt;br /&gt;&lt;br /&gt;Also, for more information on apache access control http://httpd.apache.org/docs/2.2/howto/access.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-811193064115332492?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/811193064115332492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=811193064115332492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/811193064115332492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/811193064115332492'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/02/preventing-dos-attack.html' title='Preventing DOS attack'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4257743870694099454</id><published>2010-01-28T14:16:00.000+05:30</published><updated>2010-01-28T14:17:24.049+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='heap'/><category scheme='http://www.blogger.com/atom/ns#' term='gc'/><title type='text'>Java GC logging parameters</title><content type='html'>-XX:HeapDumpPath=/tmp&lt;br /&gt;-verbose:gc&lt;br /&gt;-XX:+PrintGCTimeStamps &lt;br /&gt;-XX:+PrintGCDetails&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4257743870694099454?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4257743870694099454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4257743870694099454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4257743870694099454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4257743870694099454'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2010/01/java-gc-logging-parameters.html' title='Java GC logging parameters'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5399369118232401969</id><published>2009-11-25T10:17:00.001+05:30</published><updated>2009-11-25T10:17:41.784+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='threaddump'/><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='dump'/><category scheme='http://www.blogger.com/atom/ns#' term='thread'/><category scheme='http://www.blogger.com/atom/ns#' term='PROCESS'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>How to take a thread dump</title><content type='html'>Yesterday, I was looking to find whether any daemon thread is running with in jboss server, which does an scheduled job.&lt;br /&gt;&lt;br /&gt;Tried ps -efw but it didn't worked, as it's an internal thread, got some suggestions that dumpingthe jboss process will dump the name of daemon threaad and finally it worked great :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Find the running boss server process id.&lt;br /&gt;&lt;br /&gt;ps -efww | grep 'java' #choose your jboss server pid.&lt;br /&gt;&lt;br /&gt;# send thread dump signal.&lt;br /&gt;kill -3 $pid&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5399369118232401969?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5399369118232401969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5399369118232401969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5399369118232401969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5399369118232401969'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/11/how-to-take-thread-dump.html' title='How to take a thread dump'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3792117478212678906</id><published>2009-11-05T15:16:00.000+05:30</published><updated>2009-11-05T15:19:17.813+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='loadtest'/><category scheme='http://www.blogger.com/atom/ns#' term='lucene'/><title type='text'>Load Test: Lucene 2.4 VS Lucene 2.9</title><content type='html'>public class ContrivedFCTest extends TestCase {&lt;br /&gt;  public void testLoadTime() throws Exception {&lt;br /&gt;    Directory dir = FSDirectory.getDirectory(System.getProperty("java.io.tmpdir") + File.separator + "test");&lt;br /&gt;    IndexWriter writer = new IndexWriter (dir, new SimpleAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);&lt;br /&gt;    writer.setMergeFactor(37);&lt;br /&gt;    writer.setUseCompoundFile(false);&lt;br /&gt;    for(int i = 0; i &amp;lt; 5000000; i++) {&lt;br /&gt;      Document doc = new Document();&lt;br /&gt;      doc.add (new Field ("field",  "String" + i, Field.Store.NO, Field.Index.NOT_ANALYZED));&lt;br /&gt;      writer.addDocument(doc);&lt;br /&gt;    }&lt;br /&gt;    writer.close();&lt;br /&gt; &lt;br /&gt;    IndexReader reader = IndexReader.open(dir);&lt;br /&gt;    long start = System.currentTimeMillis();&lt;br /&gt;    FieldCache.DEFAULT.getStrings(reader, "field");&lt;br /&gt;    long end = System.currentTimeMillis();&lt;br /&gt;    System.out.println("load time:" + (end - start)/1000.0f + "s");&lt;br /&gt;  }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3792117478212678906?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3792117478212678906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3792117478212678906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3792117478212678906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3792117478212678906'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/11/load-test-lucene-24-vs-lucene-29.html' title='Load Test: Lucene 2.4 VS Lucene 2.9'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2740127035978041976</id><published>2009-11-03T12:04:00.001+05:30</published><updated>2009-11-03T12:05:18.596+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='port'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='netstat'/><title type='text'>List ports used by java process</title><content type='html'>Below is the command to list all the ports opened by a java process&lt;br /&gt;&lt;br /&gt;sudo netstat -tulpn |grep java&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2740127035978041976?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2740127035978041976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2740127035978041976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2740127035978041976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2740127035978041976'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/11/list-ports-used-by-java-process.html' title='List ports used by java process'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2102351292951507841</id><published>2009-10-26T15:05:00.001+05:30</published><updated>2009-10-26T15:06:48.130+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='port'/><category scheme='http://www.blogger.com/atom/ns#' term='socket'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='listen'/><category scheme='http://www.blogger.com/atom/ns#' term='netstat'/><title type='text'>Python socket programming</title><content type='html'>I was in a situation to make the particular port listen,&lt;br /&gt;&lt;br /&gt;Below code helped me in doing that simple.&lt;br /&gt;&lt;br /&gt;import socket&lt;br /&gt;&lt;br /&gt;    #create an INET, STREAMing socket&lt;br /&gt;    serversocket = socket.socket(&lt;br /&gt;        socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;    #bind the socket to a public host, &lt;br /&gt;    # and a well-known port&lt;br /&gt;    serversocket.bind((socket.gethostname(), 80))&lt;br /&gt;    #become a server socket&lt;br /&gt;    serversocket.listen(5)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2102351292951507841?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2102351292951507841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2102351292951507841' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2102351292951507841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2102351292951507841'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/10/python-socket-programming.html' title='Python socket programming'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-8020055752009489196</id><published>2009-09-24T18:48:00.002+05:30</published><updated>2009-09-24T18:50:22.845+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='touch'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='find'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>To touch a folder contents recursive</title><content type='html'>Some times you may need to alter the access date of files and folder. You can do it by a recursive touch command.&lt;br /&gt;&lt;br /&gt;find . | xargs touch&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-8020055752009489196?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/8020055752009489196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=8020055752009489196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8020055752009489196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8020055752009489196'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/09/to-touch-folder-contents-recursive.html' title='To touch a folder contents recursive'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4019644595876817637</id><published>2009-09-24T18:46:00.002+05:30</published><updated>2009-09-24T18:48:19.752+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='output'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='psql'/><title type='text'>psql output to file</title><content type='html'>Below is the command to redirect psql output to a file.&lt;br /&gt;&lt;br /&gt;psql&gt; \o /tmp/file.txt&lt;br /&gt;psql&gt; select * from table&lt;br /&gt;&lt;br /&gt;This should allow output to custom file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4019644595876817637?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4019644595876817637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4019644595876817637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4019644595876817637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4019644595876817637'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/09/psql-output-to-file.html' title='psql output to file'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-8649234082838707055</id><published>2009-09-18T19:28:00.001+05:30</published><updated>2009-09-18T19:30:39.006+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='remove'/><category scheme='http://www.blogger.com/atom/ns#' term='regex'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='controlcharacters'/><title type='text'>Removing control characters - python</title><content type='html'>You want a regex to remove control characters (&lt; chr(32) and &gt; chr(126)) from&lt;br /&gt;strings ie.&lt;br /&gt;&lt;br /&gt;line = re.sub(r"[^a-z0-9-';.]", " ", line)   # replace all chars NOT A-Z,a-z, 0-9, [-';.] with " "&lt;br /&gt;&lt;br /&gt;1.  What is the best way to include all the required chars rather than list them all within the r"" ?&lt;br /&gt;&lt;br /&gt;You have to list either the chars you want, as you have done, or the&lt;br /&gt;ones you don't want. You could use&lt;br /&gt;r'[\x00-\x1f\x7f-\xff]' or&lt;br /&gt;r'[^\x20-\x7e]'&lt;br /&gt;&lt;br /&gt;line = re.sub(r'[\x00-\x1f\x7f-\xff]', "", "test ^A ^B testing this again")&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-8649234082838707055?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/8649234082838707055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=8649234082838707055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8649234082838707055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8649234082838707055'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/09/removing-control-characters-python.html' title='Removing control characters - python'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2335121710469125914</id><published>2009-09-18T14:32:00.002+05:30</published><updated>2009-09-18T14:41:28.510+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xml-rpc'/><category scheme='http://www.blogger.com/atom/ns#' term='soap'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='tcpdump'/><title type='text'>Intresting tip abt tcpdump</title><content type='html'>Searched for a tool like wireshock in windows and came to know this!. This help me to dump the soap requests.&lt;br /&gt;&lt;br /&gt;Here is the simple command.&lt;br /&gt;&lt;br /&gt;sudo tcpdump -XX -s0 -i lo -w k "tcp port 80"&lt;br /&gt;&lt;br /&gt; -XX: Print packets in hex and ASCII&lt;br /&gt; -s0: Print whole packets, not only first 68 chars.&lt;br /&gt; -i is the interface to monitor.&lt;br /&gt; &lt;br /&gt; "tcp port 80" Filter expression.&lt;br /&gt; -w output file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This dumps all the requests and responses which are passing through tcp port 80!.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2335121710469125914?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2335121710469125914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2335121710469125914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2335121710469125914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2335121710469125914'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/09/intresting-tip-abt-tcpdump.html' title='Intresting tip abt tcpdump'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6936575101647365257</id><published>2009-09-02T19:27:00.001+05:30</published><updated>2009-09-02T19:30:11.593+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_deflate'/><category scheme='http://www.blogger.com/atom/ns#' term='deflate'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Apache Module mod_deflate</title><content type='html'>Looking to tune the apache for performance, then this should help you out.&lt;br /&gt;&lt;br /&gt;The mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is a simple sample configuration for the impatient.&lt;br /&gt;Compress only a few types&lt;br /&gt;&lt;br /&gt;AddOutputFilterByType DEFLATE text/html text/plain text/xml&lt;br /&gt;&lt;br /&gt;The following configuration, while resulting in more compressed content, is also much more complicated. Do not use this unless you fully understand all the configuration details.&lt;br /&gt;Compress everything except images&lt;br /&gt;&lt;br /&gt;&lt;Location /&gt;&lt;br /&gt;# Insert filter&lt;br /&gt;SetOutputFilter DEFLATE&lt;br /&gt;&lt;br /&gt;# Netscape 4.x has some problems...&lt;br /&gt;BrowserMatch ^Mozilla/4 gzip-only-text/html&lt;br /&gt;&lt;br /&gt;# Netscape 4.06-4.08 have some more problems&lt;br /&gt;BrowserMatch ^Mozilla/4\.0[678] no-gzip&lt;br /&gt;&lt;br /&gt;# MSIE masquerades as Netscape, but it is fine&lt;br /&gt;# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html&lt;br /&gt;&lt;br /&gt;# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48&lt;br /&gt;# the above regex won't work. You can use the following&lt;br /&gt;# workaround to get the desired effect:&lt;br /&gt;BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html&lt;br /&gt;&lt;br /&gt;# Don't compress images&lt;br /&gt;SetEnvIfNoCase Request_URI \&lt;br /&gt;\.(?:gif|jpe?g|png)$ no-gzip dont-vary&lt;br /&gt;&lt;br /&gt;# Make sure proxies don't deliver the wrong content&lt;br /&gt;Header append Vary User-Agent env=!dont-vary&lt;br /&gt;&lt;/Location&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6936575101647365257?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6936575101647365257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6936575101647365257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6936575101647365257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6936575101647365257'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/09/apache-module-moddeflate.html' title='Apache Module mod_deflate'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-665657589707737235</id><published>2009-06-25T10:18:00.002+05:30</published><updated>2009-06-25T10:21:05.448+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='queries'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Capture the results of the queries executed in mysqlclient in a file (no copy and paste)</title><content type='html'>One way is to copy the mysqlclient screen and paste it into a text file. The other way is to use tee. &lt;br /&gt;&lt;br /&gt;mysql&gt;&lt;br /&gt;mysql&gt; tee mysql-1.txt&lt;br /&gt;Logging to file 'mysql-1.txt'&lt;br /&gt;mysql&gt; show databases;&lt;br /&gt;+----------------+&lt;br /&gt;| Database       |&lt;br /&gt;+----------------+&lt;br /&gt;| test_db        |&lt;br /&gt;| db_3           | &lt;br /&gt;| db_4           | &lt;br /&gt;| db_5           | &lt;br /&gt;+----------------+&lt;br /&gt;4 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; exit&lt;br /&gt;Bye&lt;br /&gt;&lt;br /&gt;[thiru@cu065 tmp]$ less mysql-1.txt&lt;br /&gt;&lt;br /&gt;mysql&gt; show databases;&lt;br /&gt;+----------------+&lt;br /&gt;| Database       |&lt;br /&gt;+----------------+&lt;br /&gt;| test_db        |&lt;br /&gt;| db_3           | &lt;br /&gt;| db_4           | &lt;br /&gt;| db_5           | &lt;br /&gt;+----------------+&lt;br /&gt;4 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; exit&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-665657589707737235?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/665657589707737235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=665657589707737235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/665657589707737235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/665657589707737235'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/06/capture-results-of-queries-executed-in.html' title='Capture the results of the queries executed in mysqlclient in a file (no copy and paste)'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5418405750009440161</id><published>2009-06-22T15:20:00.001+05:30</published><updated>2009-06-22T15:22:26.704+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='seq'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='mail'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Sending mail through command line client.</title><content type='html'>Some days back I'm in situation to test the continuous spamming of mails to my mail box.&lt;br /&gt;&lt;br /&gt;This command did me the work&lt;br /&gt;&lt;br /&gt;for i in `seq 1 35`; do echo "test" | mail -s test forum@email.com; done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5418405750009440161?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5418405750009440161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5418405750009440161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5418405750009440161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5418405750009440161'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/06/sending-mail-through-command-line.html' title='Sending mail through command line client.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6664883505870049100</id><published>2009-06-03T20:06:00.004+05:30</published><updated>2009-06-03T20:14:48.216+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IfDefine'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd.conf'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><title type='text'>Apache &lt;IfDefine&gt; Directive</title><content type='html'>This is used to process some section in httpd.conf based on the system argument.&lt;br /&gt;&lt;br /&gt;The directives within an &amp;lt;ifdefine&amp;gt;&amp;lt;/ifdefine&amp;gt; section are only processed if the "test" variable is true. If "test" variable is false, everything between the start and end markers is     ignored.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;httpd -D test -k start&lt;br /&gt;&lt;br /&gt;Starting the httpd with system parameter "test" will execute the below section or else it will skip those&lt;br /&gt;&amp;lt;ifdefined&amp;gt;&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;&amp;lt;/ifdefined&amp;gt;&lt;br /&gt;&lt;br /&gt;This will be useful sometime when you try loading modules on specific arguments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6664883505870049100?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6664883505870049100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6664883505870049100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6664883505870049100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6664883505870049100'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/06/apache-directive.html' title='Apache &amp;lt;IfDefine&amp;gt; Directive'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1153998350530671300</id><published>2009-06-01T15:16:00.002+05:30</published><updated>2009-06-01T15:25:19.760+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='webserver'/><category scheme='http://www.blogger.com/atom/ns#' term='telnet'/><category scheme='http://www.blogger.com/atom/ns#' term='requests'/><title type='text'>How to Telnet to a Web Server - HTTP Requests through Telnet</title><content type='html'>Interesting, today I came to know there is a way through telnet to get the requests from the server.&lt;br /&gt;&lt;br /&gt;Normally we don't see what sent between the web server and the client. Here is the way we can see what's actually received through the telnet.&lt;br /&gt;&lt;br /&gt;To connect to the web server - open a command line and type the command&lt;br /&gt;&lt;span style="color: rgb(204, 153, 51);"&gt;telnet host port&lt;br /&gt;&lt;br /&gt;telnet localhost &lt;/span&gt;8080&lt;br /&gt;&lt;br /&gt;Then you'll get connected to the particular web server and then you can enter any HTTP command you want such as GET, HEAD.&lt;br /&gt;&lt;br /&gt;If you need to request for a web page from the web server you can type the HTTP request as follows.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 153, 51);"&gt;GET pageName HTTP/1.0&lt;br /&gt;HEAD pageName HTTP/1.0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Hit enter twice. Then you will get a response.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You'll get a 404 status if page not found, 301 if the page is moved permanently and 401 if you are not authorized to access the page. More HTTP status codes can be found &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1153998350530671300?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1153998350530671300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1153998350530671300' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1153998350530671300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1153998350530671300'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/06/how-to-telnet-to-web-server-http.html' title='How to Telnet to a Web Server - HTTP Requests through Telnet'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5483310167312317654</id><published>2009-04-30T15:30:00.001+05:30</published><updated>2009-04-30T15:32:45.767+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='repository'/><category scheme='http://www.blogger.com/atom/ns#' term='yum'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Setup YUM installer repo</title><content type='html'>To use the YUM installer you need to register the repo.&lt;br /&gt;&lt;br /&gt;Create a file "/etc/yum.repos.d/centos.repo" and paste the below content.&lt;br /&gt;&lt;br /&gt;[base]&lt;br /&gt;name=CentOS-$releasever - Base&lt;br /&gt;mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=os&lt;br /&gt;#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/&lt;br /&gt;baseurl=http://mirror.centos.org/centos/5/os/i386/&lt;br /&gt;gpgcheck=0&lt;br /&gt;gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4&lt;br /&gt;protect=1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5483310167312317654?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5483310167312317654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5483310167312317654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5483310167312317654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5483310167312317654'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/04/setup-yum-installer-repo.html' title='Setup YUM installer repo'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-856402911498330016</id><published>2009-04-23T14:29:00.003+05:30</published><updated>2009-04-23T14:41:44.844+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='user'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='PROCESS'/><title type='text'>Linux maximum processes per user</title><content type='html'>Recently I came to know there is a max count of processes allocated for each user. Below is the command to find the find that.&lt;br /&gt;&lt;br /&gt;ulimit -u&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/x4733.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-856402911498330016?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/856402911498330016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=856402911498330016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/856402911498330016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/856402911498330016'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/04/linux-maximum-processes-per-user.html' title='Linux maximum processes per user'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2411659904831302025</id><published>2009-04-17T17:31:00.002+05:30</published><updated>2009-04-17T17:34:26.939+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='characters'/><category scheme='http://www.blogger.com/atom/ns#' term='invalid'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>Removing invalid xml characters</title><content type='html'>Recently I came across oneof the good way to remove InvalidXmlCharacters. Below is the snippet.&lt;br /&gt;&lt;br /&gt;       /**&lt;br /&gt;        * Returns the input stripped of invalid XML characters.&lt;br /&gt;        *&lt;br /&gt;        * see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char for valid XML&lt;br /&gt;        * character list.&lt;br /&gt;        */&lt;br /&gt;&lt;br /&gt;       public String removeInvalidXmlCharacters(String input)&lt;br /&gt;       {&lt;br /&gt;            if (input == null) {&lt;br /&gt;                return input;&lt;br /&gt;            }&lt;br /&gt;            char c;&lt;br /&gt;            StringBuffer sb = new StringBuffer();&lt;br /&gt;            for (int i = 0; i &lt; input.length(); i++)&lt;br /&gt;            {&lt;br /&gt;                c = input.charAt(i);&lt;br /&gt;                //remove ZeroWidthSpace&lt;br /&gt;                if (c == '\u200b') {&lt;br /&gt;                    continue;&lt;br /&gt;                }&lt;br /&gt;                if ((c == 0x9) || (c == 0xA) || (c == 0xD)&lt;br /&gt;                    || ((c &gt;= 0x20) &amp;amp;&amp;amp; (c &lt;= 0xD7FF))&lt;br /&gt;                    || ((c &gt;= 0xE000) &amp;amp;&amp;amp; (c &lt;= 0xFFFD))&lt;br /&gt;                    || ((c &gt;= 0x10000) &amp;amp;&amp;amp; (c &lt;= 0x10FFFF))&lt;br /&gt;                    ) {&lt;br /&gt;                    sb.append(c);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return sb.toString();&lt;br /&gt;       }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2411659904831302025?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2411659904831302025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2411659904831302025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2411659904831302025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2411659904831302025'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/04/removing-invalid-xml-characters.html' title='Removing invalid xml characters'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6005421357435041508</id><published>2009-04-16T11:28:00.001+05:30</published><updated>2009-04-16T11:30:16.156+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>AWK to take last previous column</title><content type='html'>You can use the below command to print last previous column.&lt;br /&gt;&lt;br /&gt;awk '{print $(NF-1)}' access.log | sort | uniq | wc -l&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6005421357435041508?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6005421357435041508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6005421357435041508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6005421357435041508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6005421357435041508'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/04/awk-to-take-last-previous-column.html' title='AWK to take last previous column'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1963560842490925662</id><published>2009-04-08T08:13:00.003+05:30</published><updated>2009-04-08T08:20:31.757+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='apt-get'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu youtube no sound in firefox</title><content type='html'>I was continuously facing problem with sound while playing youtube using firefox. The youtube inturn uses gstreamer library to render the sound.&lt;br /&gt;&lt;br /&gt;Finally got sound working after installing restricted packages!&lt;br /&gt;&lt;br /&gt;Run "sudo apt-get install ubuntu-restricted-extras"&lt;br /&gt;&lt;br /&gt;Paly and check your youtube for sound.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1963560842490925662?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1963560842490925662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1963560842490925662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1963560842490925662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1963560842490925662'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/04/ubuntu-youtube-no-sound-in-firefox.html' title='Ubuntu youtube no sound in firefox'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4942172940919426934</id><published>2009-04-03T14:14:00.002+05:30</published><updated>2009-04-03T14:19:57.114+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='stress'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Subversion stress testing.</title><content type='html'>Today for one of my friend I've explored a new tool, which was used for stress testing on subversion.&lt;br /&gt;&lt;br /&gt;You can find the script &lt;a href="http://svn.collab.net/repos/svn/trunk/tools/dev/stress.pl"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Basically the script is for performing multiple operations on the repository to test the load.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4942172940919426934?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4942172940919426934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4942172940919426934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4942172940919426934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4942172940919426934'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/04/subversion-stress-testing.html' title='Subversion stress testing.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5143191307179850154</id><published>2009-03-31T12:26:00.000+05:30</published><updated>2009-03-31T12:33:55.023+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='find'/><category scheme='http://www.blogger.com/atom/ns#' term='grep'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Find and Grep</title><content type='html'>The find and grep are very usefull commands for development.&lt;br /&gt;&lt;br /&gt;When you want to grep a content for the matching files, below commands will help you out.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In linux:&lt;/span&gt;&lt;br /&gt;           &lt;span style="font-style:italic;"&gt;find /tmp -name 'page.xml' -print0 | xargs -0 grep "view_link=\"ReportView" | awk '{print $1}'  | wc -l&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In solaris:&lt;/span&gt;&lt;br /&gt;           &lt;span style="font-style:italic;"&gt;find /tmp -name 'page.xml' -exec grep "view_link=\"ReportView" {} \; | wc -l&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the above command I'm trying to find page.xml inside /tmp dir and then search content "view_link=\"ReportView" from the find output.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5143191307179850154?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5143191307179850154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5143191307179850154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5143191307179850154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5143191307179850154'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/03/find-and-grep.html' title='Find and Grep'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-357280769111052115</id><published>2009-03-30T09:59:00.001+05:30</published><updated>2009-03-30T10:05:03.413+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='start'/><category scheme='http://www.blogger.com/atom/ns#' term='stop'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='deadlock'/><category scheme='http://www.blogger.com/atom/ns#' term='cont'/><category scheme='http://www.blogger.com/atom/ns#' term='PROCESS'/><title type='text'>STOP and START a running process.</title><content type='html'>Send signals to the running process.&lt;br /&gt;&lt;br /&gt;# sending STOP signal to the process will halt the process in it's current state.&lt;br /&gt;sudo kill -STOP $pid.&lt;br /&gt;&lt;br /&gt;# To confirm the process is stopped for a moment&lt;br /&gt;sudo strace -p $pid. #this will leave traces of "STOPPED".&lt;br /&gt;&lt;br /&gt;# send CONT signal to resume the process to start it's work&lt;br /&gt;sudo kill -CONT $pid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Inorder to make the process idle (to simulate deadlock situation) I've used the above technique to stop the process and test the status of the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-357280769111052115?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/357280769111052115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=357280769111052115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/357280769111052115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/357280769111052115'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/03/stop-and-start-running-process.html' title='STOP and START a running process.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-7160311046758666814</id><published>2009-03-23T13:03:00.000+05:30</published><updated>2009-03-23T13:05:56.556+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ldd'/><category scheme='http://www.blogger.com/atom/ns#' term='dependencies'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='shared'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>To print shared library dependencies</title><content type='html'>To know what are the libraries used by any program.&lt;br /&gt;&lt;br /&gt;&gt;&gt;ldd /usr/bin/svn | grep db&lt;br /&gt;&gt;&gt;libdb-4.7.so =&gt; /lib/libdb-4.7.so (0x00154000)&lt;br /&gt;&gt;&gt;libdb-4.3.so =&gt; /lib/libdb-4.3.so (0x00cb0000)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-7160311046758666814?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/7160311046758666814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=7160311046758666814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7160311046758666814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7160311046758666814'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/03/to-print-shared-library-dependencies.html' title='To print shared library dependencies'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3046764970937295154</id><published>2009-03-20T14:10:00.000+05:30</published><updated>2009-03-20T14:17:02.426+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='pgsql'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='enable'/><category scheme='http://www.blogger.com/atom/ns#' term='psql'/><category scheme='http://www.blogger.com/atom/ns#' term='db'/><title type='text'>Enable pgsql logging</title><content type='html'>Some days back I came to situation to find when the table rows are inserted and deleted by an unknown thread!.&lt;br /&gt;&lt;br /&gt;Got an idea from one of my colleague and enabled the pgsql logging. It worked great :)&lt;br /&gt;&lt;br /&gt;To enable logging&lt;br /&gt;&lt;br /&gt;# Edit the pgsql configuration file&lt;br /&gt;/var/lib/pgsql/data/postgresql.conf&lt;br /&gt;&lt;br /&gt;# Under section # ERROR REPORTING AND LOGGING&lt;br /&gt;# Edit the logging options and set your preferrence!.&lt;br /&gt;&lt;br /&gt;&lt;snip&gt;&lt;br /&gt;...&lt;br /&gt;log_directory = 'pg_log'&lt;br /&gt;log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'&lt;br /&gt;log_line_prefix = '%u %h %t' &lt;br /&gt;log_statement = 'all'&lt;br /&gt;log_hostname = on&lt;br /&gt;...&lt;br /&gt;&lt;/snip&gt;&lt;br /&gt;&lt;br /&gt;# Go to pgsql logging dir and tail for the logfile.&lt;br /&gt;cd /var/lib/pgsql/data/pg_log/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3046764970937295154?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3046764970937295154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3046764970937295154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3046764970937295154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3046764970937295154'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/03/enable-pgsql-logging.html' title='Enable pgsql logging'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1220169573008093428</id><published>2009-02-26T18:08:00.000+05:30</published><updated>2009-02-26T18:10:53.598+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='recursive'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Recursive shell command s</title><content type='html'>I was searching for macking the commands work recursively.&lt;br /&gt;&lt;br /&gt;Below is the way to do it.&lt;br /&gt;&lt;br /&gt;MIGRATION_CONFIG_FILE="$(dirname $(dirname $(readlink $0)))"/$CONFIGURATION_FILE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1220169573008093428?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1220169573008093428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1220169573008093428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1220169573008093428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1220169573008093428'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/02/recursive-shell-command-s.html' title='Recursive shell command s'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1544521864749054258</id><published>2009-02-16T12:37:00.001+05:30</published><updated>2009-03-20T18:44:31.235+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='csplit'/><title type='text'>Splitting a patch file</title><content type='html'>Some times the patch file needs to be splitted to individual files for easy handling.&lt;br /&gt;&lt;br /&gt;Below is the command to do that, cut the patch file matching pattern "Index:".&lt;br /&gt;&lt;br /&gt;csplit artf21810.diff /Index:/ {*}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1544521864749054258?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1544521864749054258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1544521864749054258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1544521864749054258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1544521864749054258'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/02/to-split-patch-file.html' title='Splitting a patch file'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4277604893725378794</id><published>2009-02-13T19:45:00.001+05:30</published><updated>2009-02-13T19:45:49.554+05:30</updated><title type='text'>Script to delete folder in a loop</title><content type='html'>#!/bin/sh&lt;br /&gt;i=0&lt;br /&gt;while [ $i -le 40 ]&lt;br /&gt;do&lt;br /&gt;        folder="psr-pub-$i"&lt;br /&gt;        #chown apache:apache $folder -R&lt;br /&gt;        rm -rf $folder&lt;br /&gt;        i=`expr $i + 1`&lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4277604893725378794?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4277604893725378794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4277604893725378794' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4277604893725378794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4277604893725378794'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/02/script-to-delete-folder-in-loop.html' title='Script to delete folder in a loop'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2026093905303976978</id><published>2009-02-13T19:42:00.000+05:30</published><updated>2009-02-13T19:44:08.282+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><category scheme='http://www.blogger.com/atom/ns#' term='postgress'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='psql'/><title type='text'>Shell script to connect postgress in a loop</title><content type='html'>i=211&lt;br /&gt;while [ $i -le 250 ]&lt;br /&gt;do&lt;br /&gt;        folder="psr-pub-$i"&lt;br /&gt;        echo "Starting processing $folder."&lt;br /&gt;        ./svnmapping.sh $folder&lt;br /&gt;        echo "Done with $folder"&lt;br /&gt;        i=`expr $i + 1`&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;projectName=$1&lt;br /&gt;userId="user1308"&lt;br /&gt;&lt;br /&gt;DBConnect="psql -d psrdb -U psruser --tuples-only --single-line"&lt;br /&gt;&lt;br /&gt;date=`date +"%F %T"`&lt;br /&gt;projId=`echo "select id from project where path='projects.$projectName'" | $DBConnect`&lt;br /&gt;projId=`echo $projId`&lt;br /&gt;&lt;br /&gt;parent_folder_id=`echo "select id as parent_folderid from folder where path = 'scm' and project_id='$projId'" | $DBConnect`&lt;br /&gt;parent_folder_id=`echo $parent_folder_id`&lt;br /&gt;&lt;br /&gt;nextscm_id_query="select max(substring(id from (char_length('reps')+1))) from scm_repository"&lt;br /&gt;primaryId_query="select id from objecttype where application='Scm' and name='Repository'"&lt;br /&gt;secondaryId_query="select id from objecttype where application='Scm' and name='Commit'"&lt;br /&gt;&lt;br /&gt;nextscm_id=`echo $nextscm_id_query | $DBConnect`&lt;br /&gt;nextscmId=`echo $nextscm_id`&lt;br /&gt;nextscmId=reps`expr $nextscmId + 1`&lt;br /&gt;primaryId=`echo $primaryId_query | $DBConnect`&lt;br /&gt;primaryId=`echo $primaryId`&lt;br /&gt;secondaryId=`echo $secondaryId_query | $DBConnect`&lt;br /&gt;secondaryId=`echo $secondaryId`&lt;br /&gt;&lt;br /&gt;insertscm="insert into scm_repository values('$nextscmId', 'exsy1002', '/svnroot/$projectName', 'f')"&lt;br /&gt;insertfolder="insert into folder values ('$nextscmId', 'scm.$projectName', '$projectName', '$projectName', '100', '$date+05:30', '$date+05:30','f', '$primaryId', '$secondaryId', '$userId', '$userId', '$parent_folder_id', '$projId', '0')"&lt;br /&gt;&lt;br /&gt;scm=`echo $insertscm | $DBConnect`&lt;br /&gt;fol=`echo $insertfolder | $DBConnect`&lt;br /&gt;&lt;br /&gt;echo $scm"    "$fol&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2026093905303976978?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2026093905303976978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2026093905303976978' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2026093905303976978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2026093905303976978'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/02/shell-script-to-connect-postgress-in.html' title='Shell script to connect postgress in a loop'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-7206111402377118207</id><published>2009-02-05T11:33:00.001+05:30</published><updated>2009-02-05T11:39:02.724+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='alias'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>How to set alias name for network machines</title><content type='html'>Simple thing but avoids our repetative daily work.&lt;br /&gt;&lt;br /&gt;To set alias name for your frequently used machine.&lt;br /&gt;&lt;br /&gt;#Go to /etc/hosts&lt;br /&gt;vi /etc/hosts&lt;br /&gt;#Make an entry for your machine&lt;br /&gt;#IPAddress     Hostname       Alias&lt;br /&gt;127.0.0.1   connectmachine.com     connect&lt;br /&gt;#Restart your network&lt;br /&gt;/etc/rc.d/init.d/network restart&lt;br /&gt;&lt;br /&gt;Once it's done. do a ping to check it up&lt;br /&gt;&lt;br /&gt;ping connect&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-7206111402377118207?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/7206111402377118207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=7206111402377118207' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7206111402377118207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7206111402377118207'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2009/02/how-to-set-alias-name-for-network.html' title='How to set alias name for network machines'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-9157499743449428780</id><published>2008-11-26T14:42:00.000+05:30</published><updated>2008-11-26T14:50:58.777+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='timezone'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='localtime'/><category scheme='http://www.blogger.com/atom/ns#' term='locale'/><category scheme='http://www.blogger.com/atom/ns#' term='PDT'/><title type='text'>How to Change the Timezone in Linux</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Changing Timezone in linux.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1) Change to the directory &lt;span style="font-weight:bold;"&gt;/usr/share/zoneinfo&lt;/span&gt;, where you can find list of timezone regions&lt;br /&gt;&lt;br /&gt;2) Move your existing time zone &lt;br /&gt;        &lt;span style="font-weight:bold;"&gt;mv /etc/localtime  /etc/localtime-old&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3) Link the timezone u needed to localtime&lt;br /&gt;        &lt;span style="font-weight:bold;"&gt;ln -sf /usr/share/zoneinfo/America/Pacific /etc/localtime&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4) Update the system time by&lt;br /&gt;        &lt;span style="font-weight:bold;"&gt;/usr/bin/rdate -s time-a.nist.gov&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5) Set the ZONE entry in the file &lt;span style="font-weight:bold;"&gt;/etc/sysconfig/clock&lt;/span&gt; file (e.g. "America/Los_Angeles")&lt;br /&gt;&lt;br /&gt;6) /sbin/hwclock --systohc&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-9157499743449428780?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/9157499743449428780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=9157499743449428780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/9157499743449428780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/9157499743449428780'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/11/how-to-change-timezone-in-linux.html' title='How to Change the Timezone in Linux'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4998892737024020194</id><published>2008-10-08T15:17:00.001+05:30</published><updated>2008-10-08T15:20:17.517+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual'/><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Visual block in VI</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Do you need to perform multiple line edits at a single stretch. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I came across VISUAL BLOCK in vi editor. &lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; CTRL + v makes you to enter the visual mode for your file.&lt;br /&gt;&amp;nbsp;&amp;nbsp; select multiple lines&lt;br /&gt;&amp;nbsp;&amp;nbsp; SHIFT + i gives you the insert mode&lt;br /&gt;&amp;nbsp;&amp;nbsp; Enter the text at beginning of the block&lt;br /&gt;&amp;nbsp;&amp;nbsp; Press ESC twice to apply changes to all lines.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;  &lt;div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;"&gt;Blogged with the &lt;a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser"&gt;Flock Browser&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4998892737024020194?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4998892737024020194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4998892737024020194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4998892737024020194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4998892737024020194'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/10/visual-block-in-vi.html' title='Visual block in VI'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-8314142500978306127</id><published>2008-09-25T11:32:00.000+05:30</published><updated>2008-09-25T12:43:23.446+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='extract'/><category scheme='http://www.blogger.com/atom/ns#' term='log'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>PERL script for extracting log file based on time</title><content type='html'>Below code extracts the huge log file based on time frame passed.&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;my $file;&lt;br /&gt;my $times = 0;&lt;br /&gt;my $needed_response_time = 0;&lt;br /&gt;my $start;&lt;br /&gt;my $end;&lt;br /&gt;&lt;br /&gt;sub Usage&lt;br /&gt;{&lt;br /&gt;  my ($msg) = $_[0];&lt;br /&gt;  if ($msg)&lt;br /&gt;  {&lt;br /&gt;    print STDERR "$msg \n";&lt;br /&gt;  }&lt;br /&gt;  print STDERR &lt;&lt; "EOHELP"&lt;br /&gt;Usage: split_access_log_by_time &lt;options&gt; &lt;access_file&gt;&lt;br /&gt;&lt;br /&gt;options:&lt;br /&gt;&lt;br /&gt;-t &lt;starttime&gt;-&lt;endtime&gt; :: time interval for which the log is needed&lt;br /&gt;-g &lt;time in seconds&gt;     :: filter requests greater than the specified response time&lt;br /&gt;&lt;br /&gt;example : split_access_log_by_time -t 10:30:32-12:20:22 access_log&lt;br /&gt;example : split_access_log_by_time -g 10 -t 10:30:32-12:20:22 access_log&lt;br /&gt;&lt;br /&gt;EOHELP&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;my $i = 0;&lt;br /&gt;while(defined( (my $arg = $ARGV[$i++]) ))&lt;br /&gt;{&lt;br /&gt;    if($arg eq '-g')&lt;br /&gt;    {&lt;br /&gt;        $needed_response_time = $ARGV[$i++];&lt;br /&gt;    }&lt;br /&gt;    elsif($arg eq '-t')&lt;br /&gt;    {&lt;br /&gt;        $times = $ARGV[$i++];&lt;br /&gt;    }&lt;br /&gt;    elsif($arg eq '-h')&lt;br /&gt;    {&lt;br /&gt;        Usage();&lt;br /&gt;        exit 1;&lt;br /&gt;    }&lt;br /&gt;    else &lt;br /&gt;    {&lt;br /&gt;        $file = $arg;&lt;br /&gt;        last;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(!defined($file))&lt;br /&gt;{&lt;br /&gt;    Usage("No input file specified");&lt;br /&gt;    exit 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;($start, $end) = split('-', $times);&lt;br /&gt;$start = make_seconds(split(':', $start));&lt;br /&gt;$end = make_seconds(split(':', $end));&lt;br /&gt;&lt;br /&gt;if ($end &lt; $start)&lt;br /&gt;{&lt;br /&gt;    Usage("end time should be greater than start time");&lt;br /&gt;    exit 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# Group requests based on users&lt;br /&gt;open(FILE, $file);&lt;br /&gt;while(&lt;FILE&gt;)&lt;br /&gt;{&lt;br /&gt;    my $line = $_;&lt;br /&gt;    &lt;br /&gt;    my @split = split(' ', $line);&lt;br /&gt;    my $time = $split[3];&lt;br /&gt;    my $response_time = $split[-1];&lt;br /&gt;    $time = substr($time, 1);&lt;br /&gt;&lt;br /&gt;    my @timefields = split(':', $time);&lt;br /&gt;&lt;br /&gt;    my $hour = $timefields[1];&lt;br /&gt;    my $minute = $timefields[2];&lt;br /&gt;    my $second = $timefields[3];&lt;br /&gt;&lt;br /&gt;    #my $time_in_seconds = ($hour * 60 * 60) + ($minute * 60) + $second;&lt;br /&gt;    my $time_in_seconds = make_seconds($hour, $minute, $second);&lt;br /&gt;    if ($start&lt;=$time_in_seconds &amp;&amp; $end&gt;=$time_in_seconds &amp;&amp; $response_time &gt;= $needed_response_time)&lt;br /&gt;    { &lt;br /&gt;       print $line;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub make_seconds()&lt;br /&gt;{&lt;br /&gt;    (my $hour, my $minute, my $second) = @_;&lt;br /&gt;    return ($hour * 60 * 60) + ($minute * 60) + $second;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-8314142500978306127?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/8314142500978306127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=8314142500978306127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8314142500978306127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8314142500978306127'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/perl-script-for-extracting-log-file.html' title='PERL script for extracting log file based on time'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3991552193412302669</id><published>2008-09-25T11:17:00.000+05:30</published><updated>2008-09-25T11:21:27.488+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='csv'/><category scheme='http://www.blogger.com/atom/ns#' term='combine'/><category scheme='http://www.blogger.com/atom/ns#' term='join'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>PERL script to combine two csv files</title><content type='html'>Below script is used to combine two csv files based on the first column. For example, it is assumed both the file has first column related to project names.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;$FILE1 = $ARGV[0];&lt;br /&gt;$FILE2 = $ARGV[1];&lt;br /&gt;$PROJECTFILE = $ARGV[2];&lt;br /&gt;&lt;br /&gt;my %File1Map = (); &lt;br /&gt;my %File2Map = ();&lt;br /&gt;&lt;br /&gt;open(FILE1) or die("Could not open $FILE1 file.");&lt;br /&gt;foreach $line (&lt;FILE1&gt;) {&lt;br /&gt;  # ($Project,$Attachments,$Announcements,$Documents,$Discussions,$Users,$ArtifactTypeCount,$Alm) = split(',',$line);&lt;br /&gt;    ($Project,$values) = split(',',$line,2);&lt;br /&gt;  # my $tempval="$Attachments,$Announcements,$Documents,$Discussions,$Users,$ArtifactTypeCount,$Alm";&lt;br /&gt;    my $tempval = $values;&lt;br /&gt;  #  print "$Project,$values";&lt;br /&gt;    $tempval =~ s/\r|\n//g;&lt;br /&gt;    $File1Map{"$Project"} = "$tempval"; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;close(FILE1);&lt;br /&gt;&lt;br /&gt;open(FILE2) or die("Could not open $FILE2 file.");&lt;br /&gt;foreach $subline(&lt;FILE2&gt;) {&lt;br /&gt;    ($proj,$izcount) = split(',',$subline);&lt;br /&gt;    $File2Map{"$proj"}="$izcount";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;close(FILE2);&lt;br /&gt;&lt;br /&gt;open(PROJECTFILE) or die("Could not open $PROJECTFILE file.");&lt;br /&gt;foreach $projname(&lt;PROJECTFILE&gt;) {&lt;br /&gt;   ($name,$dummy)=split('\n',$projname);&lt;br /&gt;   my $existingValue=$File1Map{"$name"};&lt;br /&gt;   my $newValue=$File2Map{"$name"};&lt;br /&gt;&lt;br /&gt;   if (! defined $existingValue)&lt;br /&gt;   {&lt;br /&gt; $existingValue = ",,,,,,,,";&lt;br /&gt;   }&lt;br /&gt;   if (! defined $newValue)&lt;br /&gt;   {&lt;br /&gt; $newValue = "\n";&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   print "" . $name . "," . $existingValue . "," . $newValue;&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3991552193412302669?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3991552193412302669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3991552193412302669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3991552193412302669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3991552193412302669'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/perl-script-to-combine-two-csv-files.html' title='PERL script to combine two csv files'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-327040546234717131</id><published>2008-09-18T11:09:00.000+05:30</published><updated>2008-09-18T11:10:20.987+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='schellscript'/><category scheme='http://www.blogger.com/atom/ns#' term='if'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='else'/><title type='text'>AWK IF ELSE block</title><content type='html'>&lt;div class="mycode"&gt;&lt;br /&gt;&lt;br /&gt;nawk -F"," ' BEGIN{OFS=","} {if (NR==1) {&lt;br /&gt;                        print "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx"&lt;br /&gt;                } else {&lt;br /&gt;                        print $1,$2,$3,$4,"S",1&lt;br /&gt;                        print $1,$2,$3,$5,"S",2&lt;br /&gt;                        print $1,$2,$3,$6,"D",1&lt;br /&gt;                        print $1,$2,$3,$7,"D",2&lt;br /&gt;                }}' in.txt&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-327040546234717131?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/327040546234717131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=327040546234717131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/327040546234717131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/327040546234717131'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/awk-if-else-block.html' title='AWK IF ELSE block'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2657587217617636882</id><published>2008-09-18T10:36:00.000+05:30</published><updated>2008-09-18T10:40:39.763+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='extract'/><category scheme='http://www.blogger.com/atom/ns#' term='url'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><category scheme='http://www.blogger.com/atom/ns#' term='requests'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Extract total number of requests hits</title><content type='html'>Below is the command to calculate no of time projects accessed using the url. The informations are retrieved from log file where all the requests are logged.&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;&lt;br /&gt;cut -d ' ' -f 7 ssl_request_log |grep '/sf/'|cut -d '/' -f 3|sort|uniq -c&lt;br /&gt;&lt;br /&gt;cut -d ' ' -f 7 ssl_request_log |grep '/sf/'|sort|uniq -c&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Sample log file&lt;/span&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;[31/Aug/2008:05:50:08 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /asf-help/RoboHelp_CSH.js HTTP/1.1" 7677&lt;br /&gt;[31/Aug/2008:05:50:08 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /wsf-images/masthead/logo.gif HTTP/1.1" 2430&lt;br /&gt;[31/Aug/2008:05:50:09 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /fsf-images/masthead/dropdown.gif HTTP/1.1" 49&lt;br /&gt;[31/Aug/2008:05:50:09 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /nsf-images/masthead/help.gif HTTP/1.1" 402&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2657587217617636882?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2657587217617636882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2657587217617636882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2657587217617636882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2657587217617636882'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/extract-total-number-of-requests-hits.html' title='Extract total number of requests hits'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-8303984192691235287</id><published>2008-09-10T16:33:00.000+05:30</published><updated>2008-09-10T16:39:11.568+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='schellscript'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Script to copy contents of file between two specific line patterns</title><content type='html'>Here is the script code to copy contents of files between two line patterns.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;      To copy the contents of file starting between the particular date and end date.&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;&lt;br /&gt;if [ $# -ne 3 ]; then&lt;br /&gt;        echo 1&gt;&amp;2 Usage: $0 file_to_parsed starting_pattern ending_pattern&lt;br /&gt;        exit 127&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;startline=`grep -ni -m1 $2 $1 | awk -F ":" '{print $1}'`&lt;br /&gt;endline=`grep -ni $3 $1 | tail -n1 | awk -F ":" '{print $1}'`&lt;br /&gt;&lt;br /&gt;totallineno=`expr $endline - $startline + 1`&lt;br /&gt;echo "Extracting contents between"  $2  " and  "  $3&lt;br /&gt;echo "No of lines found: " $totallineno&lt;br /&gt;echo "Copying contents to temp file: " temp_file&lt;br /&gt;echo "`head -n$endline $1 | tail -n $totallineno`" &gt; temp_file&lt;br /&gt;echo "Done copying."&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-8303984192691235287?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/8303984192691235287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=8303984192691235287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8303984192691235287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8303984192691235287'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/script-to-copy-contents-of-file-between.html' title='Script to copy contents of file between two specific line patterns'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4085469841552500734</id><published>2008-09-10T14:33:00.001+05:30</published><updated>2008-09-10T14:37:32.276+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cowon'/><category scheme='http://www.blogger.com/atom/ns#' term='dvd'/><category scheme='http://www.blogger.com/atom/ns#' term='media'/><category scheme='http://www.blogger.com/atom/ns#' term='avi'/><category scheme='http://www.blogger.com/atom/ns#' term='convert'/><title type='text'>Convert your DVD to  other suitable formats</title><content type='html'>Need to convert your dvd?. &lt;br /&gt;Below is the command to do it.&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;for i  in 3 4 5; // loop dvd chapters&lt;br /&gt;do&lt;br /&gt;mencoder dvd://1 -chapter $i-$i -o chapter$i.avi -oac mp3lame -ovc lavc -vf scale=320:240 -lavcopts vmax_b_frames=0:acodec=mp3:abitrate=128:vbitrate=256 -ofps 30;&lt;br /&gt;done&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Going through the loop makes our job easy for all the chapters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4085469841552500734?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4085469841552500734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4085469841552500734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4085469841552500734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4085469841552500734'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/convert-your-dvd-to-other-suitable.html' title='Convert your DVD to  other suitable formats'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3046140806655802094</id><published>2008-09-10T14:27:00.001+05:30</published><updated>2008-09-10T14:30:53.827+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='min'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='sum'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><category scheme='http://www.blogger.com/atom/ns#' term='max'/><title type='text'>AWK to calculate sum, min, max of particular field in txt</title><content type='html'>Recently, I came across situation to calculate the sum, min, max of particular field using awk.&lt;br /&gt;Below is the snippet I've used to calculate the field values.&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;awk 'BEGIN{&lt;br /&gt;                FS=OFS=",";&lt;br /&gt;                max = -999999999; min = 9999999999;&lt;br /&gt;                print "----------------------------"&lt;br /&gt;        }&lt;br /&gt;        {&lt;br /&gt;                sub(" Total requests: ","",$2);&lt;br /&gt;                val = int($2);&lt;br /&gt;                lines+=1;sum+=val;&lt;br /&gt;                if( val &gt; max ) max = val;&lt;br /&gt;                if ( val &lt; min ) min = val;&lt;br /&gt;        }&lt;br /&gt;        END{&lt;br /&gt;                 print "| Total No of Lines: "lines " Sum: " sum " Average: " sum/lines " Max: " max " Min: " min &lt;br /&gt;        }' with_out.txt&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Text File Contents for parsing:&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;09/Sep/2008:03:57:09, Total requests: 36, New requests: 34&lt;br /&gt;09/Sep/2008:03:57:10, Total requests: 61, New requests: 58&lt;br /&gt;09/Sep/2008:03:57:11, Total requests: 40, New requests: 38&lt;br /&gt;09/Sep/2008:03:57:12, Total requests: 101, New requests: 97&lt;br /&gt;09/Sep/2008:03:57:13, Total requests: 33, New requests: 35&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3046140806655802094?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3046140806655802094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3046140806655802094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3046140806655802094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3046140806655802094'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/09/awk-to-calculate-sum.html' title='AWK to calculate sum, min, max of particular field in txt'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5080480230052355600</id><published>2008-08-28T12:04:00.000+05:30</published><updated>2008-08-28T12:48:55.874+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>AWK Samples</title><content type='html'>&lt;div class="mycode"&gt;&lt;br /&gt;&lt;pre style="font-weight: bold;"&gt;Here are some of the useful awk program collections!&lt;/pre&gt;awk '{print $2,$1}' filename&lt;br /&gt;awk '{print $2,$1}' filename&lt;br /&gt;awk '$1 &gt; $2 {print $1,$2,$1-$2}' filename&lt;br /&gt;&lt;pre&gt;awk '$1 &gt; $2'           filename&lt;br /&gt;awk '$1 &gt; $2{print}'    filename&lt;br /&gt;awk '$1 &gt; $2{print $0}' filename&lt;br /&gt;&lt;br /&gt;awk '$1=="foo"{print $2}' filename&lt;br /&gt;awk '/foo.*bar/{print $1,$3}' filename&lt;br /&gt;awk '$2~/foo/{print $3,$1}' filename&lt;br /&gt;&lt;samp&gt;awk '$2!~/foo/{print $3,$1}' filename&lt;/samp&gt;&lt;br /&gt;&lt;span style="font-family:Georgia,serif;"&gt;&lt;br /&gt;&lt;/span&gt;awk '/foo/,/bar/' filename&lt;/pre&gt;&lt;pre&gt;awk 'BEGIN{print"fee"} $1=="foo"{print"fi"}&lt;br /&gt;  END{print"fo fum"}' filename&lt;br /&gt;&lt;br /&gt;awk '{print $1,$NF }' filename&lt;br /&gt;awk '{print NR,$0 }' filename&lt;br /&gt;awk -F: '{print $1,$3 }' /etc/passwd&lt;br /&gt;awk '{$10=""; print }' filename&lt;br /&gt;&lt;samp&gt;awk '{for(i=1;i&lt;=NF;i++) print $i }' filename &lt;/samp&gt;awk '{printf("%s %03d %02d %.15g\n",$1,$2,$3,$3/$2); }' filename&lt;br /&gt;awk '{for(i=NF;i &gt; 0;i--) printf("%s",$i); printf("\n"); }' filename&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5080480230052355600?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5080480230052355600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5080480230052355600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5080480230052355600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5080480230052355600'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/08/awk-samples.html' title='AWK Samples'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6265355631863715689</id><published>2008-08-28T11:37:00.000+05:30</published><updated>2008-08-28T12:50:29.871+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gawk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='replace'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Replace particular field of line using awk</title><content type='html'>I was trying to replace the particular field of a line and found a suggestion for that.&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;echo 'count ****** 50' | gawk '{$2="\"5AB0\"";print}'&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The above gawk command replaces the  ****** with 5ABo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6265355631863715689?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6265355631863715689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6265355631863715689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6265355631863715689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6265355631863715689'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/08/replace-particular-field-of-line-using.html' title='Replace particular field of line using awk'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5423932756249809975</id><published>2008-08-20T14:40:00.000+05:30</published><updated>2008-08-20T14:46:36.921+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='grub'/><category scheme='http://www.blogger.com/atom/ns#' term='delete'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>To delete windows partition from ubuntu.</title><content type='html'>1) Command to see the partition&lt;br /&gt;sudo fdisk -l&lt;br /&gt;2) Mount the windows partition&lt;br /&gt;sudo mount /dev/sda1 /mnt/&lt;br /&gt;3) Look for the files and verify the data&lt;br /&gt; ls -rlt&lt;br /&gt;4)Then look for the available file system&lt;br /&gt;sudo mkfs.&lt;br /&gt;5)Create the new file system&lt;br /&gt;sudo mkfs.ext3 /dev/sda1&lt;br /&gt;6)Finally mounting the created partition&lt;br /&gt;sudo mount /dev/sda1  /mnt/&lt;br /&gt;&lt;br /&gt;To change the file system.&lt;br /&gt; sudo vim /etc/fstab&lt;br /&gt;&lt;br /&gt;To remove windows during bootup&lt;br /&gt;cd /boot/grub/&lt;br /&gt;sudo vim menu.lst&lt;br /&gt;sudo grub-install /dev/sda&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For referrence:&lt;br /&gt;prakash@prakash-laptop:/boot/grub$ cat /etc/fstab&lt;br /&gt;# /etc/fstab: static file system information.&lt;br /&gt;#&lt;br /&gt;# &lt;file&gt; &lt;mount&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;&lt;br /&gt;proc            /proc           proc    defaults        0       0&lt;br /&gt;# /dev/sda3&lt;br /&gt;UUID=38683652-4d42-4885-a18a-aa1fede0ca9d /               ext3    defaults,errors=remount-ro 0       1&lt;br /&gt;# /dev/sda1&lt;br /&gt;UUID=C2C8BE9CC8BE8DE3 /media/sda1     ntfs    defaults,nls=utf8,umask=007,gid=46 0       1&lt;br /&gt;# /dev/sda5&lt;br /&gt;#UUID=F0F6AC07F6ABCC62 /media/sda5     ntfs    defaults,nls=utf8,umask=007,gid=46 0       1&lt;br /&gt;# /dev/sda4&lt;br /&gt;UUID=cc9c91ad-8b78-417f-9e49-beee5eeb1486 none            swap    sw              0       0&lt;br /&gt;/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0&lt;br /&gt;# /dev/sda5&lt;br /&gt;/dev/sda5 /home ext3  defaults,errors=remount-ro 0       1&lt;br /&gt;# /dev/sda1&lt;br /&gt;/dev/sda1 /data ext3  defaults,errors=remount-ro 0       1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5423932756249809975?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5423932756249809975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5423932756249809975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5423932756249809975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5423932756249809975'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/08/to-delete-windows-partition-from-ubuntu.html' title='To delete windows partition from ubuntu.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3893885922287568360</id><published>2008-08-06T16:59:00.001+05:30</published><updated>2008-08-28T12:51:29.990+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mencoder'/><category scheme='http://www.blogger.com/atom/ns#' term='player'/><category scheme='http://www.blogger.com/atom/ns#' term='combining'/><category scheme='http://www.blogger.com/atom/ns#' term='avi'/><title type='text'>How to combine avi files together</title><content type='html'>Hi,&lt;br /&gt;       I was trying to combine the 2 avi files and finally came with the good output. Here are the commands I've used to do it.&lt;br /&gt;&lt;br /&gt;1) First rename the files to be appended with sequential numbers in it.&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;cat v1.avi v2.avi &gt; vtest.avi&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;2) Then invoke mencoder to get the audio and video synchronization.&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;mencoder -forceidx -oac copy -ovc copy vtest.avi -o vtest_final.avi&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3893885922287568360?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3893885922287568360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3893885922287568360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3893885922287568360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3893885922287568360'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/08/how-to-combine-avi-files-together.html' title='How to combine avi files together'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5064133831689206876</id><published>2008-07-14T15:02:00.000+05:30</published><updated>2008-08-28T12:52:30.937+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cowon'/><category scheme='http://www.blogger.com/atom/ns#' term='d2'/><title type='text'>Cowon d2 avi file support</title><content type='html'>I bought a new cowon d2 portable media player and it's sounds great.&lt;br /&gt;&lt;br /&gt;I can't play the avi downloaded from the internet. I need to convert this avi using the below command to play it&lt;br /&gt;&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;&lt;br /&gt;mencoder Kallai_Mattum_Kandal.avi -o Kallai_Mattum_Kandal_Cowon.avi -ovc lavc -vf scale=320:240 -oac mp3lame -lavcopts vmax_b_frames=0:acodec=mp3:abitrate=128:vbitrate=256&lt;br /&gt;&lt;br /&gt;for i in $*&lt;br /&gt;do&lt;br /&gt;mencoder $i -o $i"_Cowon.avi" -ovc lavc -vf scale=320:240 -oac mp3lame -lavcopts vmax_b_frames=0:acodec=mp3:abitrate=128:vbitrate=256 -mc 30&lt;br /&gt;done    &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The above makes the player to play the file with good video and sound.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5064133831689206876?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5064133831689206876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5064133831689206876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5064133831689206876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5064133831689206876'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/07/cowon-d2-avi-file-support.html' title='Cowon d2 avi file support'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6895273461887079628</id><published>2008-07-03T20:42:00.000+05:30</published><updated>2008-07-03T21:16:58.039+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='master'/><category scheme='http://www.blogger.com/atom/ns#' term='subverion'/><category scheme='http://www.blogger.com/atom/ns#' term='slave'/><category scheme='http://www.blogger.com/atom/ns#' term='repository'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><category scheme='http://www.blogger.com/atom/ns#' term='svnsync'/><title type='text'>Create master and slave subversion repository setup using svnsync</title><content type='html'>I've learned the one more svn command &lt;span style="font-weight: bold;"&gt;svnsync&lt;/span&gt;, which I ever tried before.  thought sharing this will be usefull for svn buddies.&lt;br /&gt;&lt;br /&gt;Basically this command is to replicate the svn repository (i.e) Master to n number of slave repository setup.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;1. Create the slave repository. follow the below steps for creating that.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;a. Create an new repository.&lt;br /&gt;b. Then you need to alter somescripts in the newly created repository inorder to accept this setup.&lt;br /&gt;c. Get in to hooks directory of newly created above repository and rename pre-revprop-change.tmpl to pre-revprop-change.&lt;br /&gt;d. Give pre-revprop-change executable permission.&lt;br /&gt;e. Then edit the pre-revprop-change and add &lt;span style="font-weight: bold;"&gt;exit 0&lt;/span&gt; at the begining of the file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;2. Execute the below commands to point master repository to newly created slave&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;1. &lt;span style="font-weight: bold;"&gt;svnsync init slaverepositoryurl masterrepositoryurl&lt;/span&gt;&lt;br /&gt;The above command is one time setup command (i.e) pointing the master repository to slave repository.&lt;br /&gt;2. &lt;span style="font-weight: bold;"&gt;svnsync sync slaverepositoryurl&lt;/span&gt;&lt;br /&gt;The above command is invoked when ever you need to  sync with master repository.&lt;br /&gt;&lt;br /&gt;Similarly you can have n number of slaves for the master repository.&lt;br /&gt;&lt;br /&gt;Also heared that this is not the right way to use it in production, but any how Im posting this to get startup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6895273461887079628?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6895273461887079628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6895273461887079628' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6895273461887079628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6895273461887079628'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/07/create-master-and-slave-subversion.html' title='Create master and slave subversion repository setup using svnsync'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6011055159122401839</id><published>2008-06-02T16:15:00.000+05:30</published><updated>2008-07-03T21:19:50.234+05:30</updated><title type='text'>VIM properties</title><content type='html'>&amp;lt; snippet &amp;gt;&lt;br /&gt;&lt;br /&gt;set shiftwidth=4&lt;br /&gt;set expandtab&lt;br /&gt;set tabstop=4&lt;silent&gt;&lt;c-r&gt;&lt;cr&gt;&lt;cr&gt;&lt;silent&gt;&lt;c-r&gt;&lt;cr&gt;&lt;cr&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt; / snippet &amp;gt;&lt;br /&gt;&lt;br /&gt;post the above snippet on ~/.vimrc and compile it using source ~/.vimrc&lt;/cr&gt;&lt;/cr&gt;&lt;/c-r&gt;&lt;/silent&gt;&lt;/cr&gt;&lt;/cr&gt;&lt;/c-r&gt;&lt;/silent&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6011055159122401839?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6011055159122401839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6011055159122401839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6011055159122401839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6011055159122401839'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/06/vim-properties.html' title='VIM properties'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1286447710476445612</id><published>2008-05-28T21:06:00.000+05:30</published><updated>2008-05-28T21:09:52.476+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='editor'/><category scheme='http://www.blogger.com/atom/ns#' term='tabstop'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Making your vi for default settings</title><content type='html'>If you want your vi editor to load with default settings (i.e) the line number to be displayed and also tabspace to set for 4 characters.&lt;br /&gt;&lt;br /&gt;Here the way to do...&lt;br /&gt;&lt;br /&gt;create a file&lt;a name=".exrc"&gt; ~/.exrc with settings&lt;br /&gt;&lt;br /&gt;set nu&lt;br /&gt;set tabstop=3&lt;br /&gt;&lt;br /&gt; Then opening the vi will have these settings common for all.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1286447710476445612?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1286447710476445612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1286447710476445612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1286447710476445612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1286447710476445612'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/making-your-vi-for-default-settings.html' title='Making your vi for default settings'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5253177634534736590</id><published>2008-05-22T16:49:00.000+05:30</published><updated>2008-05-22T17:09:49.052+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='perfomance'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>More about MySQL</title><content type='html'>MySQL has two types of engine&lt;br /&gt;1) InnoDB&lt;br /&gt;2) MyISAM.&lt;br /&gt;&lt;br /&gt;The difference b/w the above two is,  former supports the subquery, constraints etc... but the later won't support those. This causes the MyISAM tables relatively faster during retrieval when compared to InnoDB. But the problem is the constraint check and subquery are not applicable in it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related to performance engineering.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;How to find the total rows processed when executing an query and other infrmation.&lt;br /&gt;&lt;br /&gt;use, &lt;span style="font-weight: bold;"&gt;explain &lt;/span&gt;query&lt;br /&gt;(i.e) explain select * from table.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related to mysql dump&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;How to see the create table script of an existing table ?&lt;br /&gt;&lt;br /&gt;use, &lt;span style="font-weight: bold;"&gt;show create table &amp;amp;lt table_name &amp;amp;gt&lt;table_name&gt;&lt;br /&gt;&lt;/table_name&gt;&lt;/span&gt;(i.e) show create table  &amp;amp;lt table_name &amp;amp;gt&lt;table_name&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related to process&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;How to find the process id executing in mysql when you run a query? (i.e) Executing an query from the java client will create a process in background.&lt;br /&gt;&lt;br /&gt;use, &lt;span style="font-weight: bold;"&gt;show processlist&lt;/span&gt;&lt;/table_name&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5253177634534736590?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5253177634534736590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5253177634534736590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5253177634534736590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5253177634534736590'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/more-about-mysql.html' title='More about MySQL'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4781180756066305052</id><published>2008-05-21T12:16:00.000+05:30</published><updated>2008-06-10T16:54:26.886+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='remote'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>SSH key generation</title><content type='html'>We will be ended up by re entering the password when ever we connect to a remote machine using ssh.&lt;br /&gt;&lt;br /&gt;Here is the way to avoid re entering the password each and every time by generating a key pair Id and moving to remote machine only once.&lt;br /&gt;&lt;br /&gt;&lt;pre class="command"&gt;ssh-keygen -t dsa&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Georgia,serif;"&gt;G&lt;/span&gt;enerating public/private dsa key pair.&lt;br /&gt;&lt;/pre&gt;&lt;pre class="shell"&gt;Enter file in which to save the key (/home/localuser/.ssh/id_dsa):&lt;br /&gt;Enter passphrase (empty for no passphrase):&lt;br /&gt;Enter same passphrase again:&lt;br /&gt;Your identification has been saved in /home/localuser/.ssh/id_dsa.&lt;br /&gt;Your public key has been saved in /home/localuser/.ssh/id_dsa.pub.&lt;br /&gt;The key fingerprint is:&lt;br /&gt;93:58:20:56:72:d7:bd:14:86:9f:42:aa:82:3d:f8:e5 localuser@mybox.home.com&lt;br /&gt;&lt;br /&gt;scp ~/.ssh/id_dsa.pub username@remotemachine:.ssh/authorized_keys&lt;br /&gt;&lt;span style="font-family:Georgia,serif;"&gt;&lt;br /&gt;&lt;br /&gt;login to remote machine&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;chmod 700 ~/.ssh&lt;br /&gt;chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4781180756066305052?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4781180756066305052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4781180756066305052' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4781180756066305052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4781180756066305052'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/ssh-key-generation.html' title='SSH key generation'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5299374470011253308</id><published>2008-05-16T17:01:00.000+05:30</published><updated>2008-05-16T17:27:38.992+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Power of Shell Script</title><content type='html'>Scripts makes the job more easy !&lt;br /&gt;&lt;br /&gt;Below is the sample script which I wrote to retrieve the count of files modified for all the modified dates in home directory. This script also gives the sum of bytes for files modified on the  corresponding dates.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;prakash@prakash-laptop:~$ for filedate in `ls -l | awk '{print $6}' | sort | uniq -c | awk '{print $2}'`;do ls -l | grep $filedate | awk 'BEGIN{print "----------------------------"} {count+=1;sum+=$5} END{print $6" |  " count " |  " sum }' ; done&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sample Output&lt;br /&gt;----------------------------&lt;br /&gt;Date | Count | Sum of bytes&lt;br /&gt;----------------------------&lt;br /&gt;2007-10-30 |  1 |  26&lt;br /&gt;----------------------------&lt;br /&gt;2007-11-21 |  1 |  4096&lt;br /&gt;----------------------------&lt;br /&gt;2008-02-06 |  1 |  332341&lt;br /&gt;----------------------------&lt;br /&gt;2008-02-25 |  2 |  8192&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-03 |  1 |  999&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-04 |  1 |  219&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-05 |  1 |  3402&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-06 |  2 |  739209&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-11 |  4 |  6648&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-14 |  10 |  50918&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-15 |  4 |  106573&lt;br /&gt;----------------------------&lt;br /&gt;2008-03-16 |  1 |  10635&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Really the scripting makes your job more easy.  &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5299374470011253308?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5299374470011253308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5299374470011253308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5299374470011253308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5299374470011253308'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/power-of-shell-script.html' title='Power of Shell Script'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5492500877409426443</id><published>2008-05-15T12:36:00.000+05:30</published><updated>2008-09-10T16:51:42.181+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='program'/><category scheme='http://www.blogger.com/atom/ns#' term='CRTL + C'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ignore'/><category scheme='http://www.blogger.com/atom/ns#' term='signal'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Ignoring Unix signals</title><content type='html'>Here is the interesting small C program I came across to ignore the unix signals!.  Basically I'm a Java programmer, so this small C impressed me a lot :)&lt;br /&gt;&lt;br /&gt;Below program ignores the CTRL + C signal,&lt;br /&gt;&lt;br /&gt;test.c&lt;br /&gt;&lt;div class="mycode"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;#include &amp;lt; stdio.h &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;#include &amp;lt; signal.h &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;&lt;stdio.h&gt;&lt;signal.h&gt;&lt;br /&gt;&lt;/signal.h&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;stdio.h&gt;&lt;signal.h&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;  signal(SIGINT,SIG_IGN);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;  while(1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;     printf("You can't kill me with SIGINT anymore, dude\n");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;  return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;gcc test.c -o testout&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;./testout&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Running the above program completely ignores the CRTL + C command and keep on running with out aborting.  CRTL + C sends the SIGINT signal and we ignore that in program.&lt;/signal.h&gt;&lt;/stdio.h&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5492500877409426443?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5492500877409426443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5492500877409426443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5492500877409426443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5492500877409426443'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/ignoring-unix-signals.html' title='Ignoring Unix signals'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1819398251286300398</id><published>2008-05-13T17:51:00.000+05:30</published><updated>2008-05-13T18:27:11.314+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PID'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='PROCESS'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='SIGNALS'/><title type='text'>UNIX SIGNALS</title><content type='html'>THE UNIX SIGNALS are used for communicating the process when ever the event has occurred.&lt;br /&gt;&lt;br /&gt;When ever you give &lt;span style="color: rgb(255, 0, 0);"&gt;CRTL + C&lt;/span&gt; on the running process or &lt;span style="color: rgb(255, 0, 0);"&gt;kill&lt;/span&gt; on the running process id, the signals are sent to process to notify the event.&lt;br /&gt;&lt;br /&gt;There are about 64 signals and can be viewed using kill -l.&lt;br /&gt;&lt;br /&gt;When you press CRTL + C , by default &lt;span style="color: rgb(255, 0, 0);"&gt;SIGINT&lt;/span&gt; is sent to the running process,&lt;br /&gt;When you press CRTL + Z , by default &lt;span style="color: rgb(255, 0, 0);"&gt;SINTSTP&lt;/span&gt; is sent to the running process,&lt;br /&gt;When you press CRTL + / , by default &lt;span style="color: rgb(255, 0, 0);"&gt;SIGABRT&lt;/span&gt; is sent to the running process.&lt;br /&gt;&lt;br /&gt;Think when some one press CTRL + C when your program is half the way, you are going to end up with non cleaned up resource, this is because you do'nt have handler over the SIGINT in our program.&lt;br /&gt;&lt;br /&gt;You can write the handler for CRTL + C using trap as follows to get the control. You cannot get the handler for SIGKILL and SIGSTOP. These two signals cannot be caught while other can be.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51); font-weight: bold;"&gt;test.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;!/bin/bash&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;trap "echo 'This is trap executing for 0!'; exit 0" 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;trap "echo 'This is trap executing for SIGINT!'; exit 1" SIGINT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;trap "echo 'This is trap executing for SIGKILL!'; exit 1" SIGKILL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;trap "echo 'This is trap executing for SIGTERM!'; exit 1" SIGTERM&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;trap "echo 'This is trap executing for SIGABRT!'; exit 1" SIGABRT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;echo "We are running the script.  Press Ctrl-C to cause trap to execute!"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;read&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can also send the signals during kill using pid.&lt;br /&gt;&lt;br /&gt;For EX:&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;kill -15 pid,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above command will send the SIGTERM signal to the pid before terminating. So you can do your clean up logic by handling the signal in your program.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Using kill -9 pid,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;the above command will send the SIGKILL signal but it cannot be caught by the program, this is also similar to SIGSTOP that cannot be caught too.&lt;br /&gt;&lt;br /&gt;So it's advisable to use the SIGTERM to kill the process and then the SIGKILL as we can caught the SIGTERM signal for our operations and the SIGKILL cannot be.&lt;br /&gt;&lt;br /&gt;The Recommended order of killing the process id is&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;kill_pid () {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt; PID=$1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt; RETVAL=0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt; for signal in "TERM" "INT" "HUP" "KILL"; do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;   kill -$signal $PID&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;   RETVAL=$?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;   [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; break&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;   echo "warning: kill failed: pid=$PID, signal=$signal" &gt;&amp;amp;2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;   sleep 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt; return $RETVAL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;kill_pid 1234&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1819398251286300398?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1819398251286300398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1819398251286300398' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1819398251286300398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1819398251286300398'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/unix-signals.html' title='UNIX SIGNALS'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3071806399355061350</id><published>2008-05-13T12:34:00.000+05:30</published><updated>2008-05-13T12:40:57.081+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='uname'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='processor'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='getconf'/><title type='text'>How to find processor 32 bit or 64 bit</title><content type='html'>Some time you may need to know what bit your processor uses, for installing the packages.&lt;br /&gt;&lt;br /&gt;Here is the way you can use to find the information.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 0);"&gt;getconf LONG_BIT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 0);"&gt;uname -m&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;/code&gt;x86_64 GNU/Linux indicates you have 64bit CPU. If you use see i386/i486/i586/i686 then it is a 32 bit CPU.&lt;code&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3071806399355061350?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3071806399355061350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3071806399355061350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3071806399355061350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3071806399355061350'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/05/how-to-find-processor-32-bit-or-64-bit.html' title='How to find processor 32 bit or 64 bit'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6207639427632179130</id><published>2008-04-04T20:09:00.000+05:30</published><updated>2008-04-04T20:16:35.941+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tcp'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xserver'/><category scheme='http://www.blogger.com/atom/ns#' term='X'/><category scheme='http://www.blogger.com/atom/ns#' term='gdm'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>Facing problem with X11</title><content type='html'>I've faced some problem with X11 forwarding. Then I analsyed the X process using &lt;span style="color: rgb(255, 102, 0);"&gt;ps -ef | grep X&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I found the X process initialized has the argument&lt;span style="color: rgb(255, 102, 0);"&gt;--nolistentcp&lt;/span&gt;. Actually this prevents the tcp connection for X11. So make sure this is disabled in &lt;span style="color: rgb(255, 102, 0);"&gt;gdm.conf&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I came to know there is a entry in &lt;span style="color: rgb(255, 102, 0);"&gt;/etc/X11/gdm/gdm.conf&lt;/span&gt; which prevents the TCP connection.&lt;br /&gt;&lt;br /&gt;after altering  the "DisallowTCP"=false.&lt;br /&gt;&lt;br /&gt;and restart the X windows.&lt;br /&gt;&lt;br /&gt;To restart X windows CRTL + ALT + backspace or restart the system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6207639427632179130?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6207639427632179130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6207639427632179130' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6207639427632179130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6207639427632179130'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/04/facing-problem-with-x11.html' title='Facing problem with X11'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3421368486671619864</id><published>2008-04-01T15:44:00.000+05:30</published><updated>2008-04-01T20:03:13.880+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='songs'/><category scheme='http://www.blogger.com/atom/ns#' term='totem'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='intall'/><category scheme='http://www.blogger.com/atom/ns#' term='apt-get'/><category scheme='http://www.blogger.com/atom/ns#' term='player'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>This made my totem movie player works</title><content type='html'>Struggled a long to make my totem player work, finally the ubuntuforumn gives a break,&lt;br /&gt;&lt;br /&gt;Below is the apt-get I ran,&lt;br /&gt;&lt;pre&gt;sudo apt-get install ubuntu-restricted-extras&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3421368486671619864?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3421368486671619864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3421368486671619864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3421368486671619864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3421368486671619864'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/04/this-made-my-totem-movie-player-works.html' title='This made my totem movie player works'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5752421205090309530</id><published>2008-04-01T15:16:00.000+05:30</published><updated>2008-04-04T20:17:52.769+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='nmap'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='port'/><category scheme='http://www.blogger.com/atom/ns#' term='openedport'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>To find opened ports in linux</title><content type='html'>After a long search I found the good way to search the opened ports in a machine.&lt;br /&gt;It's nmap &amp;amp; netstat.&lt;br /&gt;&lt;br /&gt;Syntax&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;netstat -na | grep 6000&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;     &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;nmap -p 1-63335 localhost&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above command displays the ports opened in machine localhost.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5752421205090309530?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5752421205090309530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5752421205090309530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5752421205090309530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5752421205090309530'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/04/to-find-opened-ports-in-linux.html' title='To find opened ports in linux'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1061833280812162378</id><published>2008-03-27T20:30:00.000+05:30</published><updated>2008-03-27T20:41:40.628+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Mastering VI</title><content type='html'>&lt;table style="color: rgb(255, 102, 0);" align="center" border="0" cellpadding="4"&gt;&lt;tbody&gt;&lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;D&lt;br /&gt;&lt;/code&gt;&lt;/td&gt;  &lt;td&gt;To delete remaining characters under cursor in current line.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;dd&lt;/code&gt;&lt;/td&gt;  &lt;td&gt;To delete entire line and copy to clipboard  &lt;/td&gt;&lt;/tr&gt; &lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;$&lt;/code&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td&gt; Move the cursor to the end of the current line.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;C-g&lt;/code&gt;&lt;/td&gt;  &lt;td&gt;To display filename and number of lines in end of the terminal  &lt;/td&gt;&lt;/tr&gt; &lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;r&lt;/code&gt;&lt;/td&gt;  &lt;td&gt;To replace single character under cursor  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;R&lt;/code&gt;&lt;/td&gt;  &lt;td&gt;To replace multiple character under cursor untill escape is pressed  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;dw&lt;/code&gt;&lt;/td&gt;  &lt;td&gt;To replace a word under cursor&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1061833280812162378?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1061833280812162378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1061833280812162378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1061833280812162378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1061833280812162378'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/mastering-vi.html' title='Mastering VI'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-7383372787197475504</id><published>2008-03-27T19:32:00.001+05:30</published><updated>2008-03-27T20:09:05.649+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='terminal'/><title type='text'>Mastering Bash</title><content type='html'>&lt;table style="color: rgb(255, 102, 0);" align="center" border="0" cellpadding="4"&gt;&lt;tbody&gt;&lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;C-a&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Move the cursor to the beginning of the input line.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;C-d&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Same as [DEL] (this is the Emacs equivalent).  &lt;/td&gt;&lt;/tr&gt; &lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;C-e&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Move the cursor to the end of the input line.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;C-k&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Kill, or "cut," all text on the input line, from the character the cursor is underneath to the end of the line.  &lt;/td&gt;&lt;/tr&gt; &lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;C-l&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Clear the terminal screen.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;C-u&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Kill the entire input line.  &lt;/td&gt;&lt;/tr&gt; &lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;&lt;code&gt;C-y&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Yank, or "paste," the text that was last killed. Text is inserted at the point where the cursor is.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;&lt;code&gt;C-_&lt;/code&gt;&lt;/td&gt;  &lt;td&gt; Undo the last thing typed on this command line.  &lt;/td&gt;&lt;/tr&gt; &lt;tr bgcolor="#bbccee"&gt;&lt;td&gt;[&lt;em&gt;←&lt;/em&gt;]&lt;/td&gt;  &lt;td&gt; Move the cursor to the left one character.  &lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="#eeeeee"&gt;&lt;td&gt;[&lt;em&gt;→&lt;/em&gt;]&lt;/td&gt;  &lt;td&gt; Move the cursor to the right one character.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-7383372787197475504?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/7383372787197475504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=7383372787197475504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7383372787197475504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7383372787197475504'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/mastering-bash.html' title='Mastering Bash'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6399069413767634510</id><published>2008-03-27T19:03:00.000+05:30</published><updated>2008-03-27T19:14:01.979+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='apt-get'/><category scheme='http://www.blogger.com/atom/ns#' term='thumbnail'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>To resize image for thumbnail in linux</title><content type='html'>Need the thumbnail, Here is the utility I used..&lt;br /&gt;&lt;br /&gt;First install the imagemagic&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;    sudo apt-get intsall imagemagic&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Use convert command to make your thumbnail.&lt;br /&gt;&lt;br /&gt;Here 200 is the&lt;/span&gt; &lt;/span&gt;200px width&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;convert -thumbnail 200 DSC01536.JPG DSC01536_thumb.JPG&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Here x200 is the &lt;/span&gt;&lt;/span&gt;200px height&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;convert -thumbnail x200 DSC01536.JPG DSC01536_thumb.JPG&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6399069413767634510?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6399069413767634510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6399069413767634510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6399069413767634510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6399069413767634510'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/to-resize-image-for-thumbnail-in-linux.html' title='To resize image for thumbnail in linux'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-2810145132524168565</id><published>2008-03-27T18:42:00.000+05:30</published><updated>2008-03-27T19:02:36.886+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ctrl'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='terminal'/><title type='text'>&amp;lt CRTL &amp;gt + r for Search in terminal command line</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);"&gt;"This is used to search already executed command in Linux terminal."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We waste timings by retyping the command often for a small argument changes. But this is not worthy, Hmmm you can use&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;crtl&gt; CRTL + r&lt;/crtl&gt;&lt;/span&gt; to searching the already executed commands.&lt;br /&gt;&lt;br /&gt;USAGE:&lt;br /&gt;Press &lt;span style="color: rgb(255, 102, 0);"&gt; &lt;ctrl&gt;CRTL  + r&lt;/ctrl&gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 102, 0);"&gt;enter text&lt;/span&gt; to match the already executed command. Matching results will be dispalyed, so now you can reuse them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-2810145132524168565?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/2810145132524168565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=2810145132524168565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2810145132524168565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/2810145132524168565'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/r-for-search-in-terminal-command-line.html' title='&amp;lt CRTL &amp;gt + r for Search in terminal command line'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4743854681022430920</id><published>2008-03-19T16:54:00.000+05:30</published><updated>2008-03-19T18:59:20.208+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='settings'/><category scheme='http://www.blogger.com/atom/ns#' term='MAC'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='address'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>To Alter MAC address in windows, linux</title><content type='html'>I heard that we can't use some internet broad band connectivity expect the specific system as it's bounded to that specific MAC address.&lt;br /&gt;&lt;br /&gt;Hmmm, the above raised a question? how to use that in other laptop etc...&lt;br /&gt;&lt;br /&gt;Got a suggestion, Why can't you change your machine or laptop's MAC address matching the original bounded MAC address.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;To Change MAC address in windows!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Go to,&lt;br /&gt;&lt;br /&gt;Settings &gt; Network Connections &gt; local area connection &gt; General  Tab &gt; configure &gt; Advanced &gt; Locally Administered Address &gt;  value.&lt;br /&gt;&lt;br /&gt;Give the value , MAC address of bounded machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;To Change MAC address in linux!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;ifconfig eth0 down&lt;br /&gt;&lt;br /&gt;ifconfig eth0 hw ether 00:00:00:AB:AC:AA&lt;br /&gt;&lt;br /&gt;ifconfig eth0 up&lt;br /&gt;&lt;br /&gt;This will use the mac address temporally to browse!.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4743854681022430920?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4743854681022430920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4743854681022430920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4743854681022430920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4743854681022430920'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/to-alter-mac-address.html' title='To Alter MAC address in windows, linux'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3717828147949372382</id><published>2008-03-11T20:00:00.000+05:30</published><updated>2008-03-11T20:14:54.839+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><category scheme='http://www.blogger.com/atom/ns#' term='zenity'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>About Zenity, a linux command.</title><content type='html'>Need GTK+ support for the command or shell. Yes this is the right command. It's almost belong to similar family like Xdisplay, display, cDisplay.&lt;br /&gt;&lt;br /&gt;Try this, it's awesome. I do no whether it's inbuilt in redhat but it's there in ubuntu.&lt;br /&gt;&lt;br /&gt;Some quick cracks on that.&lt;br /&gt;&lt;br /&gt;To get the calendar !&lt;br /&gt;      &lt;span style="color: rgb(255, 102, 0);"&gt;zenity --calendar&lt;/span&gt;&lt;br /&gt;To get the input from the user !&lt;br /&gt;     &lt;span style="color: rgb(255, 153, 0);"&gt;zenity --entry &lt;/span&gt;&lt;br /&gt;To get Yes or No&lt;br /&gt;     &lt;span style="color: rgb(255, 102, 0);"&gt;zenity --question --text "Do you need to proceed reading?"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use the ouput of the above command to input of another command using &lt;span style="color: rgb(51, 0, 0);"&gt;echo $?&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;span style="color: rgb(51, 0, 0);"&gt;echo$?&lt;/span&gt; returns status of the previous command.&lt;br /&gt;&lt;br /&gt;answer=`zenity --question --text "You appear to have an AMD64 architecture. Do you want to install the 64-bit version of Songbird?"; &lt;span style="color: rgb(51, 0, 0);"&gt;echo $?&lt;/span&gt;`&lt;br /&gt;&lt;br /&gt;if [ $anw = 0 ] ; then&lt;br /&gt;....&lt;br /&gt;....&lt;br /&gt;....&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;I've missed this command lot or else I would've used in most of my scripting languages to get the user inputs :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3717828147949372382?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3717828147949372382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3717828147949372382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3717828147949372382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3717828147949372382'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/about-zenity-linux-command.html' title='About Zenity, a linux command.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-9202265601077066251</id><published>2008-03-07T10:14:00.000+05:30</published><updated>2008-03-27T19:16:03.927+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='screen'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='nohup'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>GNU Screen &amp;&amp; nohup</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(204, 51, 204);"&gt;These commands are useful to run commands even after closing ssh.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;screen - &lt;/span&gt;when you need to run the process in background with the terminal alive for further process or monitor&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;nohup - &lt;/span&gt;when you need to run the process in background with out control over the process or the monitor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Commands for screen&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To start the new screen&lt;br /&gt;&lt;span style="color: rgb(255, 204, 51);"&gt;screen &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To detach from the screen with out exiting the session&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;Crtl a + d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To reattach to the default first screen&lt;br /&gt;&lt;span style="color: rgb(255, 204, 51);"&gt;screen -r&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;If more than one screen listed then select the appropriate screen using&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;screen -x {pid/name}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Command for nohup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;nohup command&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-9202265601077066251?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/9202265601077066251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=9202265601077066251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/9202265601077066251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/9202265601077066251'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/gnu-screen-nohup.html' title='GNU Screen &amp;&amp; nohup'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-5783707186315172902</id><published>2008-03-04T19:46:00.000+05:30</published><updated>2008-03-05T19:44:34.612+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='battery'/><category scheme='http://www.blogger.com/atom/ns#' term='power'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Hibernate it's not "Hibernate in Action"</title><content type='html'>I was little bit eager to find why my windows OS doesn't consume power and it's not same in case of ubuntu OS during my laptop is idle.&lt;br /&gt;&lt;br /&gt;  Then the reason came out is because of "Hibernate", Yes there is an Hibernate function in windows xp which  makes the batteries live longer. Then I've used the Hibernate function in ubuntu too and it made it as expected!!!!.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-5783707186315172902?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/5783707186315172902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=5783707186315172902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5783707186315172902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/5783707186315172902'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/hibernate-its-not-hibernate-in-action.html' title='Hibernate it&apos;s not &quot;Hibernate in Action&quot;'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3337694842869570755</id><published>2008-03-04T11:49:00.000+05:30</published><updated>2008-03-04T11:55:11.945+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='vpn'/><category scheme='http://www.blogger.com/atom/ns#' term='config'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>VPN configuration in Ubuntu</title><content type='html'>Recently I've configured the VPN for first time and here are&lt;br /&gt;some commands related to it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   Install VPNC&lt;/span&gt;&lt;br /&gt;   sudo apt-get install vpnc&lt;br /&gt;   cd /etc/vpnc/&lt;br /&gt;   sudo ls /etc/vpnc&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;  Configure VPNC&lt;/span&gt;&lt;br /&gt;   sudo vim /etc/vpnc/example.conf&lt;br /&gt;   sudo mv /etc/vpnc/example.conf /etc/vpnc/default.conf&lt;br /&gt;   sudo vpnc&lt;br /&gt;   sudo vim /etc/vpnc/default.conf&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;  To start VPNC&lt;/span&gt;&lt;br /&gt;   sudo vpnc&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;  To Disconnect VPNC&lt;/span&gt;&lt;br /&gt;   sudo vpnc-disconnect&lt;br /&gt;   ps ax|grep network&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;Restart Network&lt;/span&gt;&lt;br /&gt;   sudo /etc/init.d/networking restart&lt;br /&gt;   ping yahoo.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3337694842869570755?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3337694842869570755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3337694842869570755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3337694842869570755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3337694842869570755'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/03/vpn-configuration-in-ubuntu.html' title='VPN configuration in Ubuntu'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-425509618492990606</id><published>2008-02-26T18:57:00.000+05:30</published><updated>2008-02-26T20:03:40.367+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='split'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>To split and analyze the log files.</title><content type='html'>When ever the log file size is more, Try splitting it and view the file!&lt;br /&gt;&lt;br /&gt;Calculate the length of the log file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 0);"&gt;wc -l log-file.log&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then split the file based on the total number of lines.&lt;br /&gt;For ex Consider the no of lines as 1000, then we can split in to files of 100 lines using below command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 0);"&gt;split -l100 log-file.log log-file.log.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will result in multiple files of 100 lines each. The name of files would be appended by aa,ab,....&lt;br /&gt;&lt;br /&gt;To rejoin the file use below command&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$ cat log-file.log.* &gt;lastweek.mp3&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-425509618492990606?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/425509618492990606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=425509618492990606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/425509618492990606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/425509618492990606'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/to-split-and-analyze-log-files.html' title='To split and analyze the log files.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6233831691667909895</id><published>2008-02-26T18:41:00.000+05:30</published><updated>2008-02-26T18:49:59.230+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='discarding'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='redirect'/><title type='text'>What for /dev/null?</title><content type='html'>Do you know why they redirect to&lt;span style="color: rgb(51, 51, 255);"&gt; /&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;dev/null&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt style="color: rgb(51, 51, 255);"&gt;&lt;b&gt;/dev/null&lt;/b&gt;&lt;/tt&gt; or &lt;b&gt;the null device&lt;/b&gt; is a special file that discards all data written to it&lt;br /&gt;&lt;br /&gt;The null device is typically used for disposing of unwanted output streams of a process. It's equivalent to "don't bother about the results ".&lt;br /&gt;&lt;br /&gt;ex:&lt;br /&gt;&lt;br /&gt;ls -l *.txt &gt; name.txt 2&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/dev/null&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6233831691667909895?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6233831691667909895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6233831691667909895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6233831691667909895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6233831691667909895'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/what-for-devnull.html' title='What for /dev/null?'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-3825233033282232612</id><published>2008-02-25T18:24:00.000+05:30</published><updated>2008-02-25T18:28:29.458+05:30</updated><title type='text'>Consecutive commands in linux</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Adding &amp;amp;&amp;amp; between the commands works!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Command1 &amp;amp;&amp;amp; Command2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Some times we would be pasting the command in vim with out a directory. I think this will be more helpful to append before the command instead of removing and pasting another time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mkdir DIST &amp;amp;&amp;amp; command&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-3825233033282232612?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/3825233033282232612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=3825233033282232612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3825233033282232612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/3825233033282232612'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/consecutive-commands-in-linux.html' title='Consecutive commands in linux'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-8231190451803613306</id><published>2008-02-25T14:18:00.000+05:30</published><updated>2008-02-25T14:50:02.851+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='bedugging'/><title type='text'>Debug Java Application or Java Web Application using Eclipse</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Steps To Configure Java Application with eclipse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Append below parameters to &lt;span style="font-weight: bold;"&gt;JVM_ARGUMENTS&lt;/span&gt; of the Application&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,&lt;br /&gt;address=&lt;span style="color: rgb(255, 0, 0);"&gt;5050&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Configure your Eclipse Debugger.&lt;br /&gt;&lt;br /&gt;Go to project source.&lt;br /&gt;Place Break Points in Project source where ever needed.&lt;br /&gt;Go to &lt;span style="font-weight: bold;"&gt;Project &gt; Run &gt; Open Debug Dialog&lt;/span&gt;&lt;br /&gt;Create new &lt;span style="font-weight: bold;"&gt;Remote Java Application&lt;/span&gt; with corresponding parameter&lt;br /&gt;Host - Application Host IP&lt;br /&gt;Port - &lt;span style="color: rgb(255, 0, 0);"&gt;Port&lt;/span&gt; specified in JVM_ARGUMENTS of Application.&lt;br /&gt;Click Debug&lt;br /&gt;&lt;br /&gt;3. Access your application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-8231190451803613306?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/8231190451803613306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=8231190451803613306' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8231190451803613306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/8231190451803613306'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/eclipse-debugging-java-application-or.html' title='Debug Java Application or Java Web Application using Eclipse'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1927068125189894446</id><published>2008-02-22T11:45:00.000+05:30</published><updated>2008-02-22T11:50:26.348+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Xssh'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='X'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='Xforwarding'/><title type='text'>Basic X11 Forwarding Over SSH</title><content type='html'>X11Forwarding needs to be enabled on the sshd server. Do this by making the following edit: &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;File: /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After you make these changes, you will need to restart sshd so the changes will be accepted:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;/etc/init.d/sshd restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Don't forget to log out and log in to the server for this change to take effect.&lt;br /&gt;&lt;br /&gt;Note: one reason for receiving the error messages&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;xterm Xt error: Can't open display: your_client_name:0.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;may be that X11Forwarding is not enabled on the server.&lt;br /&gt;[edit] Running single apps&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;$ ssh -X &amp;lt remote_server &amp;gt &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1927068125189894446?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1927068125189894446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1927068125189894446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1927068125189894446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1927068125189894446'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/basic-x11-forwarding-over-ssh.html' title='Basic X11 Forwarding Over SSH'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-7132503575454092284</id><published>2008-02-21T21:08:00.001+05:30</published><updated>2008-02-25T16:45:53.251+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><category scheme='http://www.blogger.com/atom/ns#' term='compile'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Needed shell script to compile and run java files.</title><content type='html'>#Let's start building the classpath with existing jars &amp;amp; libs.&lt;br /&gt;THE_CLASSPATH=&lt;br /&gt;for i in `ls *.jar`&lt;br /&gt;do&lt;br /&gt; THE_CLASSPATH=${THE_CLASSPATH}:${i}&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;# Let's compile all the java file.&lt;br /&gt;&lt;br /&gt;for i in `find . -name '*.java'`&lt;br /&gt;do&lt;br /&gt;echo "Compiling $i"&lt;br /&gt;javac -cp $THE_CLASSPATH $i&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;# invoke the main function.&lt;br /&gt;&lt;br /&gt;java -cp .:$THE_CLASSPATH $CLASSNAME$&lt;br /&gt;unset THE_CLASSPATH&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-7132503575454092284?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/7132503575454092284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=7132503575454092284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7132503575454092284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/7132503575454092284'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/needed-shell-script-to-compile-and-run.html' title='Needed shell script to compile and run java files.'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-999015871894024190</id><published>2008-02-21T21:02:00.000+05:30</published><updated>2008-02-21T21:12:17.764+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='classpath'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><title type='text'>To set classpath in linux</title><content type='html'>Simple tips, tought it will be useful &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;CLASSPATH=*.class:$CLASSPATH&lt;br /&gt;export CLASSPATH&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-999015871894024190?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/999015871894024190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=999015871894024190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/999015871894024190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/999015871894024190'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/to-set-classpath-in-linux.html' title='To set classpath in linux'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4022948708794304168</id><published>2008-02-20T11:04:00.000+05:30</published><updated>2008-02-20T11:07:20.870+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vi'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>To open mutiple files in vi</title><content type='html'>&lt;span style="font-weight:bold;"&gt;vi -o file1 file2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To switch between splitted windows use&lt;br /&gt;&lt;br /&gt;&amp;lt ctrl &amp;gt+ w&lt;br /&gt;&lt;br /&gt;To Quit all qa!&lt;br /&gt;To save all wa!&lt;br /&gt;To save&amp;quit wqa!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4022948708794304168?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4022948708794304168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4022948708794304168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4022948708794304168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4022948708794304168'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/to-open-mutiple-files-in-vi.html' title='To open mutiple files in vi'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-6172322190990714126</id><published>2008-02-19T12:26:00.000+05:30</published><updated>2008-02-25T16:47:58.316+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><category scheme='http://www.blogger.com/atom/ns#' term='diff'/><title type='text'>Diff and Patch</title><content type='html'>I Recently came across two more useful linux commands diff and patch. :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DIFF&lt;/span&gt;:&lt;br /&gt;Display the differences between two files, or each corresponding file in two directories.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SYNTAX&lt;/span&gt;&lt;br /&gt;diff [options] from-file to-file &gt; path-file-name&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PATCH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SYNTAX&lt;/span&gt;&lt;br /&gt;patch -p0 &lt; new-patch&lt;br /&gt;patch -p1 &lt; new-patch&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Levels in the Patch Command (-p0 or -p1?):&lt;/span&gt;&lt;br /&gt;The -p option will optionally strip off directory levels from the patchfile. For Ex: if you have a patchfile with a header as such:&lt;br /&gt;&lt;br /&gt;--- old/modules/pcitable Mon Sep 27 11:03:56 1999&lt;br /&gt;+++ new/modules/pcitable Tue Dec 19 20:05:41 2000&lt;br /&gt;&lt;br /&gt;Using a -p0 will expect, from your current working directory, to find a subdirectory called "new", then "modules" below that, then the "pcitable" file below that.&lt;br /&gt;&lt;br /&gt;Using a -p1 will strip off the 1st level from the path and will expect to find (from your current working directory) a directory called "modules", then a file called "pcitable". Patch will ignore the "new" directory mentioned in the header of the patchfile.&lt;br /&gt;&lt;br /&gt;For more Info:&lt;br /&gt;man diff/patch&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-6172322190990714126?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/6172322190990714126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=6172322190990714126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6172322190990714126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/6172322190990714126'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/diff-patch.html' title='Diff and Patch'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-4534639878640368307</id><published>2008-02-19T11:56:00.000+05:30</published><updated>2008-02-19T12:41:24.352+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='password'/><title type='text'>To Reset Firefox MasterPassword</title><content type='html'>Firefox:&lt;br /&gt;&lt;br /&gt;Enter "&lt;span style="font-weight: bold;"&gt;chrome://pippki/content/resetpassword.xul&lt;/span&gt;" in the Location Bar, press Enter, then click "Reset"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-4534639878640368307?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/4534639878640368307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=4534639878640368307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4534639878640368307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/4534639878640368307'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2008/02/resetting-firefox-masterpassword.html' title='To Reset Firefox MasterPassword'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8654658029836947514.post-1949093313829289177</id><published>2007-07-23T10:38:00.000+05:30</published><updated>2008-02-19T12:43:19.351+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Powerfully using SSH</title><content type='html'>This is the article which gives good ideas to use SSH powerfully&lt;br /&gt;&lt;a href="http://polishlinux.org/apps/ssh-tricks/#"&gt;&lt;br /&gt;http://polishlinux.org/apps/ssh-tricks/#&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8654658029836947514-1949093313829289177?l=prakashspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prakashspot.blogspot.com/feeds/1949093313829289177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8654658029836947514&amp;postID=1949093313829289177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1949093313829289177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8654658029836947514/posts/default/1949093313829289177'/><link rel='alternate' type='text/html' href='http://prakashspot.blogspot.com/2007/07/powerfully-using-ssh.html' title='Powerfully using SSH'/><author><name>Prakash</name><uri>http://www.blogger.com/profile/16338281062715863432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_nBsn_0bKCT8/SdD5NcstmCI/AAAAAAAACpA/rueq3-djIO4/S220/megamalai_trip+009.jpg'/></author><thr:total>0</thr:total></entry></feed>
