<?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:blogger='http://schemas.google.com/blogger/2008' 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-6057845287915627323</id><updated>2024-09-17T07:41:41.370+05:30</updated><category term="Unix"/><category term="TIPS"/><category term="TRICKS"/><category term="BASH"/><category term="Encrypt"/><category term="Password"/><category term="SHELL"/><category term="Shell Script"/><category term="awk"/><category term="command line"/><category term="one liner"/><category term="/dev/null"/><category term="Delhi"/><category term="HISTORY"/><category term="Kill"/><category term="KnowledgeBase"/><category term="Linux"/><category term="MAC"/><category term="Open Source"/><category term="Test Manager"/><category term="Testing"/><category term="User Activity Monitoring"/><category term="Vol"/><category term="duplicate"/><category term="eleminating"/><category term="entertainment"/><category term="filesize"/><category term="find"/><category term="grep"/><category term="ls"/><category term="networking"/><category term="path"/><category term="performance"/><category term="redirections"/><category term="sed"/><category term="sparse files"/><category term="telecom"/><category term="tr"/><category term="translation"/><category term="vim"/><title type='text'>Unix Ground</title><subtitle type='html'>A unique blog for Unix, Linux based Tips, tricks and Shell Scripts. This is intended to be one-stop Information Center for all your Unix, Linux needs.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-1014969646178165538</id><published>2011-06-14T14:45:00.001+05:30</published><updated>2011-06-14T14:45:58.710+05:30</updated><title type='text'></title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZBg2Ghz_iZj0g1TsZZnVhTe1U66A_Cadodz2yp6ix2JgWpjlvp5_kajOUZ62IgRK-ejOqs6ZOWoZzS8ru4-NF7GqqhPj1rlnGjJFO8GOfluRVZl88jCKISgx4d7lpz_92ByjgCuBZrVaf/s1600/unix_ground_wordCloud.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 202px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZBg2Ghz_iZj0g1TsZZnVhTe1U66A_Cadodz2yp6ix2JgWpjlvp5_kajOUZ62IgRK-ejOqs6ZOWoZzS8ru4-NF7GqqhPj1rlnGjJFO8GOfluRVZl88jCKISgx4d7lpz_92ByjgCuBZrVaf/s320/unix_ground_wordCloud.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5618001564733597410&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Tag cloud taken from http://www.wordle.net/</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/1014969646178165538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/1014969646178165538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/1014969646178165538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/1014969646178165538'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2011/06/tag-cloud-taken-from-httpwww.html' title=''/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZBg2Ghz_iZj0g1TsZZnVhTe1U66A_Cadodz2yp6ix2JgWpjlvp5_kajOUZ62IgRK-ejOqs6ZOWoZzS8ru4-NF7GqqhPj1rlnGjJFO8GOfluRVZl88jCKISgx4d7lpz_92ByjgCuBZrVaf/s72-c/unix_ground_wordCloud.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-6666050330452554886</id><published>2010-06-09T08:18:00.003+05:30</published><updated>2010-06-09T08:24:12.694+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="/dev/null"/><category scheme="http://www.blogger.com/atom/ns#" term="redirections"/><title type='text'>Bourne shell redirection</title><content type='html'>&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;0 is stdin; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;1 is stdout; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 0, 0);&quot;&gt;2 is stderr&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;redirect std err to file&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);font-size:100%;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;$command 2&gt;file&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;direct the output from command to stderr&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);font-size:100%;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;$commamd &gt;&amp;amp; 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;direct std output and std err to a file or /dev/null&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);font-size:100%;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;$ command &gt;file.log &gt;&gt;file.log&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; $ command &gt;file.log 2&gt;&amp;amp;1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; $ command &gt;/dev/null 2&gt;&amp;amp;1&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/6666050330452554886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/6666050330452554886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6666050330452554886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6666050330452554886'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2010/06/bourne-shell-redirection.html' title='Bourne shell redirection'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-4525978870627979249</id><published>2010-06-09T08:12:00.003+05:30</published><updated>2010-06-09T08:20:54.767+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="awk"/><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="one liner"/><category scheme="http://www.blogger.com/atom/ns#" term="sed"/><title type='text'>Some cool one liners..</title><content type='html'>sum numbers in first column of a file&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;$ cat filename | awk &#39;BEGIN { tot=0 } { tot+=$1 } END { print tot }&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;only print certain lines in a file, eq 20 - 30&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;$ sed -n -e 20,30p   filename&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Search all files in and below for a string xyz:&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;$ find . -exec egrep xyz {} \; -print  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Remove all files name &quot;.log.tmp&quot;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;$ find . -name .log.tmp -exec rm {} \;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;search a file for any of three strings:    &lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;$ egrep &#39;abc|xyz|or&#39;  filename&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/4525978870627979249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/4525978870627979249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/4525978870627979249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/4525978870627979249'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2010/06/some-cool-one-liners.html' title='Some cool one liners..'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-7051082875682341888</id><published>2010-01-20T13:47:00.006+05:30</published><updated>2011-06-14T14:43:16.094+05:30</updated><title type='text'>Sexy Unix Commands</title><content type='html'>&lt;h1&gt;&lt;span&gt;&lt;span id=&quot;ctl00_cphMainContent_lbQuestion&quot;&gt;&lt;span style=&quot;font-size: 78%; &quot;&gt;&lt;span&gt;the follwing are the sexy commands.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: 64%; &quot;&gt;date;&lt;br /&gt;unzip;&lt;br /&gt;touch;&lt;br /&gt;strip;&lt;br /&gt;finger;&lt;br /&gt;mount;&lt;br /&gt;gasp;&lt;br /&gt;yes;&lt;br /&gt;uptime;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/7051082875682341888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/7051082875682341888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/7051082875682341888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/7051082875682341888'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2010/01/sexy-unix-commands.html' title='Sexy Unix Commands'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-6763327935055035007</id><published>2009-05-06T19:17:00.002+05:30</published><updated>2009-05-06T19:23:49.853+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="duplicate"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><title type='text'>removing duplicate files using shell script</title><content type='html'>Friends,&lt;br /&gt;&lt;br /&gt;One liner script provided below, can be used to identify the duplicate files within the system. If you want to search in a partticular path, just replace it with &quot;&lt;strong&gt;/tmp&quot; &lt;/strong&gt;provided in sample command. It will redirect all the duplicate file names into &lt;strong&gt;removal_list.txt&lt;/strong&gt; which can be used to delete them.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;find /tmp &quot;$@&quot; -type f -print0  xargs -0 -n1 md5sum  sort --key=1,32  uniq -w 32 -d --all-repeated=separate  sed -r &#39;s/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)/#rm \1/&#39; &gt;&gt; removal_list.txt&lt;/span&gt;&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/6763327935055035007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/6763327935055035007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6763327935055035007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6763327935055035007'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2009/05/removing-duplicate-files-using-shell.html' title='removing duplicate files using shell script'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-2044321806218808699</id><published>2009-05-06T19:16:00.002+05:30</published><updated>2009-05-06T19:17:13.277+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Performance comparision</title><content type='html'>Checkout the &quot;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;time&lt;/span&gt;&lt;/strong&gt;&quot; command.&lt;br /&gt;&lt;br /&gt;For checking the time taken for execution of any command do the following:&lt;br /&gt;&lt;br /&gt;Say you want to execute &quot;ls -l  grep sanju.txt&quot; and measure time taken for this.&lt;br /&gt;Now open a bash shell and on the prompt&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;$time ls -l  grep sanju.txt &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;it shows you the time taken by the command execution</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/2044321806218808699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/2044321806218808699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/2044321806218808699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/2044321806218808699'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2009/05/performance-comparision.html' title='Performance comparision'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-6498978733666403252</id><published>2009-05-05T16:46:00.000+05:30</published><updated>2009-05-05T16:48:56.057+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ls"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRICKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Unaliasing in BASH</title><content type='html'>&lt;p&gt;&lt;strong&gt;Unaliasing in BASH&lt;/strong&gt;&lt;br /&gt;How can we unalias a command temporarily without using unalias command ?&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;just put the escape character before the command i.e. &quot;\&quot;e.g. :- &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;$\ls &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It will show the without alias.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/6498978733666403252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/6498978733666403252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6498978733666403252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6498978733666403252'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2009/05/unaliasing-in-bash.html' title='Unaliasing in BASH'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-8750944486045784165</id><published>2009-01-22T09:42:00.001+05:30</published><updated>2009-01-22T09:43:54.053+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="vim"/><title type='text'>How to count a particular word in VI?</title><content type='html'>If you want to count a particular word, say PROG, in a file, try this trick&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;:1,$s/zebra/&amp;amp;/g&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;if you want to count all words in a file, try&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;g [ctrl-g] &lt;/span&gt;&lt;/strong&gt;at command mode&lt;br /&gt;&lt;br /&gt;&lt;em&gt;source: &lt;/em&gt;&lt;a href=&quot;http://www.vim.org/tips/tip.php?tip_id=689&quot;&gt;&lt;em&gt;http://www.vim.org/tips/tip.php?tip_id=689&lt;/em&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/8750944486045784165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/8750944486045784165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/8750944486045784165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/8750944486045784165'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2009/01/how-to-count-particular-word-in-vi.html' title='How to count a particular word in VI?'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-2797607604831942952</id><published>2009-01-22T09:38:00.002+05:30</published><updated>2009-01-22T09:42:10.120+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Some useful commands</title><content type='html'>&lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;strong&gt;df&lt;/strong&gt;   &lt;/span&gt; : report disk free space&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;gview &lt;/span&gt;&lt;/strong&gt;: load VIM, improved vi editor&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;history&lt;/span&gt;&lt;/strong&gt; : display a list of previous commands&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;!!&lt;/span&gt; : repeat previous command&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;strong&gt;ls -p  grep &quot;/&quot;&lt;/strong&gt;&lt;/span&gt; : list sub-directories in the current directory&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;touch file.ext&lt;/span&gt;&lt;/strong&gt; : create a NULL file named &#39;file.ext&#39;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;vmstat &lt;/span&gt;&lt;/strong&gt;: virtual memory status&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;strong&gt;uname &lt;/strong&gt;&lt;/span&gt;: system information</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/2797607604831942952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/2797607604831942952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/2797607604831942952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/2797607604831942952'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2009/01/some-useful-commands.html' title='Some useful commands'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-325135150246033664</id><published>2009-01-22T09:33:00.002+05:30</published><updated>2009-01-22T09:38:00.206+05:30</updated><title type='text'>How to kill a hanged/freezed application ?</title><content type='html'>Have you ever faced a hanged/freezed application while working at GUI of linux/sun etc?&lt;br /&gt;If yes, this topic is for YOU.&lt;br /&gt;&lt;br /&gt;Xkill is a utility for forcing the X server to close connections to clients. This program is very dangerous, but is useful for aborting programs that have displayed undesired windows on a user&#39;s screen. If no resource identifier is given with -id, xkill will display a special cursor as a prompt for the user to select a window to be killed.&lt;br /&gt;&lt;br /&gt;We can use &lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;&#39;xkill&#39;&lt;/span&gt;&lt;/strong&gt; for a hard-to-kill frozen application. First, open a new terminal and type &lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;strong&gt;&quot;xkill&quot;.&lt;/strong&gt;&lt;/span&gt;  After this your cursor will be a square-shaped.&lt;br /&gt;&lt;br /&gt;Move to frozen findow and click.</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/325135150246033664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/325135150246033664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/325135150246033664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/325135150246033664'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2009/01/how-to-kill-hangedfreezed-application.html' title='How to kill a hanged/freezed application ?'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-8994453516255219058</id><published>2008-09-17T10:19:00.002+05:30</published><updated>2008-09-17T10:23:18.943+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRICKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>TRIMMING THE LOG</title><content type='html'>Various unix processes canproduce fast growing logs thatsometimes need to be trimmedinstead of deleted, for referenceor troubleshooting. And youlikely have no desire to edit thefiles. Here is a handy kshscript that will quickly trimthe log so it keeps recentinformation and lets you keep asmany lines as you think you mightneed.&lt;br /&gt;&lt;br /&gt;I call it &lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;trimlog&lt;/span&gt;&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;#! /bin/sh&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;# trimlog&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;filesize=`cat $1wc -l`&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;trim=`expr $filesize - $2`&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;    if [ $trim -gt 0 ]&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;        then&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;               sed &quot;1,$trim d&quot; $1 &gt; /tmp/$1&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;              mv /tmp/$1 $1&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;              echo $1 trimmed by $trim lines&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;        else&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;             echo &quot;Invalid argument&quot;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;    fi&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Use it by feeding in the name of the log you want to trim followedby the number of lines you want to keep:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;# trimlog oracle_listener.log 10000&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Of course you can&#39;t use it in the /tmp directory.&lt;br /&gt;There are probably newer and more efficient ways to do this, but this works.</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/8994453516255219058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/8994453516255219058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/8994453516255219058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/8994453516255219058'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/trimming-log.html' title='TRIMMING THE LOG'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-3031835136962071366</id><published>2008-09-17T10:14:00.002+05:30</published><updated>2008-09-17T10:19:00.553+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Kill"/><category scheme="http://www.blogger.com/atom/ns#" term="KnowledgeBase"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>kill really does not KILL</title><content type='html'>kill is not really meant only to kill a process.  But mainintention is to send a signalto process. And the processhandles these signals to dovarious tasks.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;kill -INT 1234&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;where 1234 is the Process ID is really, this set an interrupt signal, Ctrl-C is an example of interupt signal givento shell.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;kill -HUP 1234&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;some UNIX daemons handle this, to do refreshing business.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;kill -KILL 1234&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is the sure kill,which cannot be handled by any process. Also know as,&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;strong&gt;kill -9 1234&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just, check the in the file &lt;strong&gt;/usr/include/sys/signal.h&lt;/strong&gt; for all signals on the system or you can use:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;kill -l&lt;/span&gt; &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;to get the complete list of signals.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note: More about this can be found onkill and signal man pages.&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/3031835136962071366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/3031835136962071366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/3031835136962071366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/3031835136962071366'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/kill-really-does-not-kill.html' title='kill really does not KILL'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-3289619579657868655</id><published>2008-09-17T10:11:00.001+05:30</published><updated>2008-09-17T10:14:48.341+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="networking"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>AUTOMATIC LOGIN TO REMOTE HOSTS w/o PASSWORD</title><content type='html'>Consider two hosts.host1.domain.comhost2.domain.com&lt;br /&gt;&lt;br /&gt;&gt;From hosts (user:deepak), you wish to logon tohost1 (user:paul).&lt;br /&gt;&lt;br /&gt;Paul would create a .rhostsfile in his directory&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;chmod 744 .rhosts&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;(No write permission forothers)&lt;br /&gt;The first line would contain&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;host1.domain.com deepak&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Now,  deepak should be able to logon to host2.domain.comas user paul by using rlogin.&lt;br /&gt;Deepak will type&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;rlogin hosts.domain.com -l paul&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;And he should be in.</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/3289619579657868655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/3289619579657868655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/3289619579657868655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/3289619579657868655'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/automatic-login-to-remote-hosts-wo.html' title='AUTOMATIC LOGIN TO REMOTE HOSTS w/o PASSWORD'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-1467121529689556465</id><published>2008-09-17T10:09:00.001+05:30</published><updated>2008-09-17T10:11:24.548+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="eleminating"/><category scheme="http://www.blogger.com/atom/ns#" term="one liner"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell Script"/><category scheme="http://www.blogger.com/atom/ns#" term="tr"/><title type='text'>ELIMINATING MULTIPLE SPACES</title><content type='html'>Here is a simple script whichhelps in eliminating multiplespaces when one wants toextract a particular columnin a set of records from afile.&lt;br /&gt;&lt;br /&gt;Here is an example to provethe same:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;ps -u $LOGNAME  tr -s &quot; &quot; :  cut -d: -f&lt;column&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The above script line can beused to extract a column fromthe output of a ps command for a  particular user ($LOGNAME).</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/1467121529689556465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/1467121529689556465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/1467121529689556465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/1467121529689556465'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/eliminating-multiple-spaces.html' title='ELIMINATING MULTIPLE SPACES'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-7630068365789162551</id><published>2008-09-15T15:53:00.002+05:30</published><updated>2008-09-15T15:57:50.419+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Encrypt"/><category scheme="http://www.blogger.com/atom/ns#" term="Password"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRICKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>CRYPT AN ASCII FILE</title><content type='html'>An ascii file can be easily encrypted and decrypted.&lt;br /&gt;To encrypt simply pipe the STDOUT ofthe file to &quot;crypt&quot; and redirect it toa new file name. Enter a passowrd whenprompted with &quot;Enter key&quot;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;$ cat foo crypt &gt; foo.e&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Enter key:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;To unencrypt simply pipe the STDOUT ofthe encrypted file to &quot;crpyt&quot; andredirect it to a new file name. Entera passowrd when prompted with&quot;Enter key&quot;.&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;$ cat foo.e crypt &gt; foo.new&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Enter key:&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/7630068365789162551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/7630068365789162551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/7630068365789162551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/7630068365789162551'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/crypt-ascii-file.html' title='CRYPT AN ASCII FILE'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-576318995363182064</id><published>2008-09-04T12:44:00.003+05:30</published><updated>2008-09-04T12:52:44.000+05:30</updated><title type='text'>Getting access to your linux box without password</title><content type='html'>&lt;strong&gt;&lt;u&gt;For BSD:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;In order to recover your root password, you must boot FreeBSD in single user mode, mount the filesystems read/write and issue the passwd command. The passwd command will not actually recover your root password, but will allow you to change it to something new.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Boot in single user mode&lt;br /&gt;&lt;/em&gt;As the operating system is starting, it will display the following message:Hit [Enter] to boot immediately, or any other key for command prompt.&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Booting [kernel] in 10 seconds...&lt;/span&gt;&lt;br /&gt;You should now press the &lt;strong&gt;space bar&lt;/strong&gt;, and you will see the following message:&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Type &#39;?&#39; for a list of commands, or &#39;help&#39; for more detailed help.ok&gt;&lt;/span&gt;&lt;br /&gt;Now type &lt;strong&gt;boot -s&lt;/strong&gt; and press the enter key to start FreeBSD in single user mode.&lt;br /&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;ok&gt; boot -s&lt;/span&gt;&lt;br /&gt;After the system boots, you should see the statement:&lt;br /&gt;Enter full pathname of shell or RETURN for /bin/sh:&lt;br /&gt;Press the enter key and you will have a # prompt and you can change the password using &lt;strong&gt;passwod&lt;/strong&gt; command&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;For RH Linux&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a name=&quot;S1-RESCUEMODE-BOOTING-SINGLE&quot;&gt;&lt;em&gt;Booting Single-User Mode&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;You may be able to boot single-user mode directly. If your system boots, but does not allow you to log in when it has completed booting, try single-user mode.&lt;br /&gt;If you are using GRUB, use the following steps to boot into single-user mode:&lt;br /&gt;If you have a GRUB password configured, type &lt;span style=&quot;color:#ffffff;&quot;&gt;p&lt;/span&gt; and enter the password.&lt;br /&gt;Select Red Hat Linux with the version of the kernel that you wish to boot and type &lt;span style=&quot;color:#ffffff;&quot;&gt;e&lt;/span&gt; for edit. You will be presented with a list of items in the configuration file for the title you just selected.&lt;br /&gt;Select the line that starts with kernel and type e to edit the line.&lt;br /&gt;Go to the end of the line and type &lt;span style=&quot;color:#ffffff;&quot;&gt;single&lt;/span&gt; as a separate word (press the &lt;span style=&quot;color:#ffffff;&quot;&gt;[Spacebar]&lt;/span&gt; and then type single). Press &lt;span style=&quot;color:#ffffff;&quot;&gt;[Enter]&lt;/span&gt; to exit edit mode.&lt;br /&gt;Back at the GRUB screen, type b to boot into single user mode.&lt;br /&gt;After boot, you can change the password of root using &lt;strong&gt;passwd&lt;/strong&gt; command</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/576318995363182064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/576318995363182064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/576318995363182064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/576318995363182064'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/getting-access-to-your-linux-box.html' title='Getting access to your linux box without password'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-3625173945805321283</id><published>2008-09-04T12:39:00.002+05:30</published><updated>2008-09-04T12:43:58.456+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="translation"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>CASE TRANSLATION</title><content type='html'>If you have occasion whereyou need to translate uppercase to lower and viceversa, and happen to run aksh, enter the following functions into your .bash_profile:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;trans ()&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;{ &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;tr &#39;[:upper:]&#39; &#39;[:lower:]&#39; &lt; $1 &gt; $2&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;TRANS()&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;{&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;tr &#39;[:lower:]&#39; &#39;[:upper:]&#39; &lt;$1 &gt; $2&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The first function &lt;strong&gt;trans&lt;/strong&gt; will translate all uppercaseletters in the first file(argument) to lowercase in the second file.&lt;br /&gt;The second function &lt;strong&gt;TRANS&lt;/strong&gt; does the exact opposite.</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/3625173945805321283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/3625173945805321283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/3625173945805321283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/3625173945805321283'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/case-translation.html' title='CASE TRANSLATION'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-6573503703416679795</id><published>2008-09-04T11:35:00.002+05:30</published><updated>2008-09-04T12:38:21.684+05:30</updated><title type='text'>Tip within unix</title><content type='html'>tip is a &lt;a title=&quot;Unix&quot; href=&quot;http://en.wikipedia.org/wiki/Unix&quot;&gt;unix&lt;/a&gt; utility for establishing a &lt;a title=&quot;Terminal&quot; href=&quot;http://en.wikipedia.org/wiki/Terminal&quot;&gt;terminal&lt;/a&gt; connection to a remote system via a &lt;a title=&quot;Modem&quot; href=&quot;http://en.wikipedia.org/wiki/Modem&quot;&gt;modem&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The tip command line options are as follows tip [-v] [-speed-entry] {hostname  phone-number  device}&lt;br /&gt;&lt;br /&gt;A simple example is a script that establishes a terminal session:&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;spawn tip modem&lt;br /&gt;expect &quot;connected&quot;&lt;br /&gt;send &quot;ATD$argc\r&quot;&lt;br /&gt;set timeout 30&lt;br /&gt;expect &quot;CONNECT&quot;&lt;/span&gt;&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/6573503703416679795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/6573503703416679795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6573503703416679795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/6573503703416679795'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/09/tip-within-unix.html' title='Tip within unix'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-497286080447483099</id><published>2008-08-01T12:42:00.004+05:30</published><updated>2008-08-01T12:54:53.710+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRICKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><category scheme="http://www.blogger.com/atom/ns#" term="User Activity Monitoring"/><title type='text'>Tracking User&#39;s activity using &quot;script -a&quot;</title><content type='html'>Unix System provides a very good method  allows us to capture of all commands issued by the user “XYZ”.  For this, we can user &quot;script&quot; command. This  will print all what appears on the screen (commands and their output) to the filename&lt;br /&gt;&lt;br /&gt;But remember, Its not a User History.... It  stores all commands entered by all users (.e. its the shell history .&lt;br /&gt;&lt;br /&gt;Add the following line to your BASH profile&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;  script -a ~/.termlog`date +%m%d%y`&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This enable to capture all the terminal activities to a file ending with current date</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/497286080447483099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/497286080447483099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/497286080447483099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/497286080447483099'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/08/tracking-users-activity-using-script.html' title='Tracking User&#39;s activity using &quot;script -a&quot;'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-8061234426169075670</id><published>2008-07-28T14:07:00.007+05:30</published><updated>2008-07-28T14:21:30.153+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="command line"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Cut and paste text files by columns</title><content type='html'>How many times have you wanted to edit those results files columnwise?&lt;br /&gt;&lt;br /&gt;Here’s a generic UNIX way: (startcol and endcol refer to character columns, including whitespace. Tab counts as 1.)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;cut -cstartcol-endcol file {&gt;receiving file} paste sourcefile1 sourcefile2 {&gt;final file}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I like to preview and fine-tune my commands by looking at the result on standard out (the shell window) and then redirecting output to a (temporary) file when things look right. Those feeling really adventurous can combine things into a single command line…</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/8061234426169075670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/8061234426169075670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/8061234426169075670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/8061234426169075670'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/07/cut-and-paste-text-files-by-columns.html' title='Cut and paste text files by columns'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-1608375298927097255</id><published>2008-07-28T14:07:00.005+05:30</published><updated>2008-07-28T14:20:33.989+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRICKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><category scheme="http://www.blogger.com/atom/ns#" term="Vol"/><title type='text'>Great Unix Tips &amp; Tricks: Vol 1</title><content type='html'>&lt;p&gt;Whether you are a newbie to Linux or you are a seasoned guru, you are bound to find some scripts or programs which just make your life on the computer exponentially easier. The following is a list of them and explains what they do.&lt;/p&gt;&lt;p style=&quot;font-weight: bold;&quot;&gt;1. tac&lt;/p&gt;&lt;dir&gt; &lt;p&gt; tac is a command similar to cat, except that it reverses the output of the specified file.&lt;/p&gt; &lt;p&gt; &lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;tac &lt;file&gt;&lt;/file&gt;&lt;/span&gt;&lt;/p&gt; &lt;/dir&gt;  &lt;p style=&quot;font-weight: bold;&quot;&gt;2. Multiple X-Sessions&lt;/p&gt;&lt;dir&gt; &lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;Using multiple X-Sessions allows a user to have open more than just one instance of XFree, so multiple desktop environments can be used at a time.&lt;/p&gt; &lt;p&gt; &lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;startx -- :&lt;terminal&gt;&lt;/terminal&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;  terminal name is simply which terminal X should start on.  By default it starts on&lt;/p&gt; &lt;p&gt;  0:0.  If you want two open, you may want it open on 0:1, which can be run by:&lt;/p&gt; &lt;p&gt;  &lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;startx -- :1&lt;/span&gt;&lt;/p&gt; &lt;p&gt;  The resulting desktops will exist on F7 - F12.&lt;/p&gt; &lt;/dir&gt;&lt;p style=&quot;font-weight: bold;&quot;&gt;3. links&lt;/p&gt;&lt;dir&gt; &lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;links is a text based browser which has full support for tables&lt;/p&gt; &lt;p&gt; &lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;links &lt;hostname&gt;&lt;/hostname&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;  &lt;hostname&gt; is simply the hostname or IP address of the computer to connect to.&lt;/hostname&gt;&lt;/p&gt; &lt;/dir&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/1608375298927097255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/1608375298927097255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/1608375298927097255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/1608375298927097255'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/07/great-unix-tips-tricks-vol-1.html' title='Great Unix Tips &amp; Tricks: Vol 1'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-2045460033858415205</id><published>2008-07-28T14:07:00.001+05:30</published><updated>2008-07-28T14:12:44.535+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="sparse files"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>sparse files</title><content type='html'>Due to the Unix concept of &lt;b&gt;sparse                 files&lt;/b&gt;, you can create seemingly enormous files that in reality take                 next to no disk space.  The following program will create a 305,419,897                 byte file called &#39;core&#39; that may result in you receiving a &#39;cleanup&#39;                 email message from a less-than-seasoned Unix sysadmin                 even though it occupies virtually no real disk space.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    &lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;$ cat bigcore.c&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    #include &lt;fcntl.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    #include &lt;unistd.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    int main(void) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;        int fd = open(&quot;core&quot;, O_CREAT|O_WRONLY|O_TRUNC, 0600);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;        lseek(fd, 0x12345678, SEEK_SET);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;        write(fd, &quot;1&quot;, 1);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;        close(fd);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;        return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;    $ cc -o bigcore bigcore.c&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;    $ ./bigcore&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;    $ ls -l core&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    -rw-------  1 dmr  staff  305419897 May  1 03:50 core&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(255, 255, 255);&quot;&gt;    $ du -k core&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    48      core&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;    $&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/2045460033858415205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/2045460033858415205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/2045460033858415205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/2045460033858415205'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/07/sparse-files.html' title='sparse files'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-4973766197411790997</id><published>2008-07-15T14:44:00.003+05:30</published><updated>2008-07-15T15:00:58.340+05:30</updated><title type='text'>Ctrl+D or exit: Which one is better?</title><content type='html'>&lt;p&gt;In BASH, to exit from shell we can use Ctrl+D or exit ? which one is better?&lt;/p&gt;&lt;p&gt;-Ctrl+D conveniently exits Bash&lt;br /&gt;-Sometimes too conveniently bcoz session may be terminated if pressed accidentaly.&lt;/p&gt;&lt;p&gt;To avoid the accidental exit, we can specify the no of &quot;Ctrl+D&quot; pressed before exit.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;$export IGNOREEOF=1&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;$ Ctrl+D&lt;br /&gt;$ Use &quot;exit&quot; to leave the shell.&lt;br /&gt;$ Ctrl+D&lt;br /&gt;$ exit&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/4973766197411790997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/4973766197411790997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/4973766197411790997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/4973766197411790997'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/07/ctrld-or-exit-which-one-is-better.html' title='Ctrl+D or exit: Which one is better?'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-4504735344126496911</id><published>2008-07-09T15:32:00.001+05:30</published><updated>2008-07-09T15:34:04.463+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="entertainment"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Games</title><content type='html'>If you like to use Linux and only Linux, and you also like to play games on your computer, the best choice is to buy native Linux games (games that run without any intermediate layer on your Linux system). You can find lots of information about available games and even order them through the links below.&lt;br /&gt;&lt;br /&gt;Naturally there are also lots of free games, many simple but fun games are included with Linux distributions, but some are not, so I have included links about those too.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.linuxgamepublishing.com/&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Linux Game Publishing&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.tuxgames.com/index.cgi?referrer=mandrake.tips&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Tux Games&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://linuxgaming.net/index.php&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Linux Gaming&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.linuxgames.com/&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Linuxgames&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.happypenguin.org/&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;The Linux Game &lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://pgshopping.com/mdkxp/?c=games/freegames&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Mandrake eXPerience FREE GAMES section&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.linuxhardware.org/article.pl?sid=03/04/18/169209&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;Article on Gaming and Linux in 2003&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/4504735344126496911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/4504735344126496911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/4504735344126496911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/4504735344126496911'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/07/games.html' title='Games'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6057845287915627323.post-345992710890385725</id><published>2008-07-08T16:24:00.002+05:30</published><updated>2008-07-08T16:30:47.958+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BASH"/><category scheme="http://www.blogger.com/atom/ns#" term="TRICKS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Command based Calculator in BASH</title><content type='html'>Bash can perform simple arithmetic operations at the command prompt.&lt;br /&gt;&lt;br /&gt;To use this feature, simply type in the arithmetic expression you wish to evaluate at the prompt within double parentheses, as illustrated below. Bash will attempt to perform the calculation and return the answer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;bash&gt; echo $((16/2))&lt;br /&gt;8&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;bash&gt; echo $((16*2))&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ffffff;&quot;&gt;32&lt;/span&gt;&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixground.blogspot.com/feeds/345992710890385725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6057845287915627323/345992710890385725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/345992710890385725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6057845287915627323/posts/default/345992710890385725'/><link rel='alternate' type='text/html' href='http://unixground.blogspot.com/2008/07/command-based-calculator-in-bash.html' title='Command based Calculator in BASH'/><author><name>Sanju</name><uri>http://www.blogger.com/profile/01905114297039264657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY-MWeIoN9uRSb1JeIUk2n-tNIT3_Gr8PI8azY-f8j2-N1N_c47Pkh7ahngKuiHH6iFLs_wPItyTjfayL5-Uv52oivHKCoUE6Z5VDq4V5-Qwj_-nlu0ejVwqEPfCc4NY0/s220/ATYAAADsfYztvsUPnn3jicJLtuOd3ibz9BwOTjSq2eVxQzsLoUG4y1ticM6tQwmVrpoODVdqn6gHqyoMrTbehnxgCCXGAJtU9VCInhtH1vuIudVGpz8aij5QmNM2Jg.jpg'/></author><thr:total>0</thr:total></entry></feed>