<?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'><id>tag:blogger.com,1999:blog-6820481775641762988</id><updated>2009-11-08T16:27:29.418+05:30</updated><title type='text'>Tech Trek</title><subtitle type='html'>Technical tid-bits and more ! 
Leave a comment if you found something useful.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default?start-index=26&amp;max-results=25'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>64</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-8611423809282501046</id><published>2009-11-07T09:23:00.004+05:30</published><updated>2009-11-07T09:27:27.179+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Find lines of code in your repository</title><content type='html'>&lt;pre name="code" class="shell"&gt;&lt;br /&gt;        for ext in "*.java" "*.xml" "*.css" "*.jsp" "*.js" "*.sql"&lt;br /&gt;        do&lt;br /&gt;                echo -n "$ext,$location,"&lt;br /&gt;                find ./$location -iname "$ext" -exec wc -l '{}' \;|gawk '{total+=$1} END{print total}'&lt;br /&gt;        done&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/6820481775641762988-8611423809282501046?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/8611423809282501046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=8611423809282501046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8611423809282501046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8611423809282501046'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/11/find-lines-of-code-in-your-repository.html' title='Find lines of code in your repository'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-7846299655431579665</id><published>2009-10-22T17:54:00.001+05:30</published><updated>2009-10-22T18:04:31.420+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><title type='text'>Passing Debug Parameters to JVM using Ant</title><content type='html'>&lt;pre name="code" class="xml"&gt;&lt;br /&gt; &lt;target name="rundebug" depends="base.dist"&gt;&lt;br /&gt;  &lt;java fork="true" classname="com.fiberlink.example.Example" classpathref="libraries" maxmemory="1000m"&gt;&lt;br /&gt;   &lt;classpath path="${target.classes.dir}"/&gt;&lt;br /&gt;   &lt;arg value="${action}"/&gt;&lt;br /&gt;   &lt;jvmarg value="-Xdebug"/&gt;&lt;br /&gt;        &lt;jvmarg value="-Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=y"/&gt;&lt;br /&gt;  &lt;/java&gt;&lt;br /&gt; &lt;/target&gt;&lt;br /&gt;&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/6820481775641762988-7846299655431579665?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/7846299655431579665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=7846299655431579665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/7846299655431579665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/7846299655431579665'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/10/passing-debug-parameters-to-jvm-using.html' title='Passing Debug Parameters to JVM using Ant'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3396844762550438710</id><published>2009-07-02T19:20:00.000+05:30</published><updated>2009-07-02T19:21:08.999+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dba'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Getting tablespace Size</title><content type='html'>&lt;pre&gt;&lt;br /&gt;SELECT tablespace_name,&lt;br /&gt;       SUM (bytes) / 1024 / 1024 current_size,&lt;br /&gt;       autoextensible,&lt;br /&gt;       SUM (maxbytes) / 1024 / 1024 max_size&lt;br /&gt;FROM dba_data_files&lt;br /&gt;WHERE tablespace_name like '%'&lt;br /&gt;GROUP BY tablespace_name, autoextensible&lt;br /&gt;ORDER BY 1&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/6820481775641762988-3396844762550438710?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3396844762550438710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3396844762550438710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3396844762550438710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3396844762550438710'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/07/getting-tablespace-size.html' title='Getting tablespace Size'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-2696056113072842565</id><published>2009-05-10T14:53:00.002+05:30</published><updated>2009-05-10T14:55:08.996+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='unix'/><title type='text'>bash : search and replace from previous command</title><content type='html'>&lt;p&gt;tar -cvf sandeep.tar sandeep/&lt;/p&gt;&lt;p&gt;!!:gs/sandeep/singhal will mean&lt;/p&gt;&lt;p&gt;tar -cvf singhal.tar singhal/&lt;/p&gt;&lt;p&gt;:gs is for global search and replace&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-2696056113072842565?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/2696056113072842565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=2696056113072842565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/2696056113072842565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/2696056113072842565'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/05/bash-search-and-replace-from-previous.html' title='bash : search and replace from previous command'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-8336419653999350115</id><published>2009-05-10T14:19:00.004+05:30</published><updated>2009-05-10T14:24:18.966+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='unix'/><title type='text'>bash - last argument of the previous command (nth argument)</title><content type='html'>&lt;ul&gt;&lt;li&gt;Get the last argument of the previous command : !!$&lt;/li&gt;&lt;li&gt;Get the first argumnet of the previous command : !!^&lt;/li&gt;&lt;li&gt;Get the 1st argument of the previous command : !!1&lt;/li&gt;&lt;li&gt;Get the nth argument of the previous command : !!n&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Examples : &lt;/p&gt;&lt;p&gt;$&gt; ls :!!$  (or !$) &lt;/p&gt;&lt;p&gt;$&gt; ls :!!^&lt;/p&gt;&lt;p&gt;$&gt; ls :!!2&lt;/p&gt;&lt;p&gt;$&gt; ls :!!n&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-8336419653999350115?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/8336419653999350115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=8336419653999350115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8336419653999350115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8336419653999350115'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/05/bash-last-argument-of-previous-command.html' title='bash - last argument of the previous command (nth argument)'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-5379309017436274221</id><published>2009-05-02T12:12:00.003+05:30</published><updated>2009-05-02T12:18:09.250+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Trigger GC in eclipse.</title><content type='html'>This is a handy  for eclipse which lets you to trigger gc in the eclipse instead of waiting for the jvm to schedule the GC .&lt;br /&gt;&lt;br /&gt;Go to Window-&gt;Preferences-&gt;General, mark Show Heap status check box.&lt;br /&gt;The current Heap usage  with icon for "Run Garbage Collector" will appear at the bottom right.&lt;br /&gt;&lt;br /&gt;It helps a lot in eclipse performance.&lt;br /&gt;&lt;br /&gt;I find it pretty handy especially because I do not shutdown eclipse often.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-5379309017436274221?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/5379309017436274221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=5379309017436274221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/5379309017436274221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/5379309017436274221'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/05/trigger-gc-in-eclipse.html' title='Trigger GC in eclipse.'/><author><name>Nalini Kannan</name><uri>http://www.blogger.com/profile/03683040835597762941</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07062478208161024029'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-4331445153290478914</id><published>2009-05-01T09:51:00.003+05:30</published><updated>2009-05-01T09:54:33.815+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='browsers'/><title type='text'>Two things I love about opera</title><content type='html'>&lt;p&gt;1. You can type windows specific path on the browser bar and it will covert it to "forward slashes" when you are browsing directory like strucure on a browser&lt;/p&gt;&lt;p&gt;2. The quick search box : The cursor remains at the same place if you go to a different window by "ALT-TAB". This in firefox changes to select the entire text already typed in the search box. Hence you cannot start typing straight away, since that will erase the already entered text. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-4331445153290478914?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/4331445153290478914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=4331445153290478914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/4331445153290478914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/4331445153290478914'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/05/two-things-i-love-about-opera.html' title='Two things I love about opera'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-1201713850758820279</id><published>2009-04-26T21:01:00.000+05:30</published><updated>2009-04-26T21:02:17.865+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dba'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Common sqlplus commands</title><content type='html'>ACCEPT - Get input from the user &lt;br /&gt;DEFINE - Declare a variable (short: DEF) &lt;br /&gt;DESCRIBE - Lists the attributes of tables and other objects (short: DESC) &lt;br /&gt;EDIT - Places you in an editor so you can edit a SQL command (short: ED) &lt;br /&gt;EXIT or QUIT - Disconnect from the database and terminate SQL*Plus &lt;br /&gt;GET - Retrieves a SQL file and places it into the SQL buffer &lt;br /&gt;HOST - Issue an operating system command (short: !) &lt;br /&gt;LIST - Displays the last command executed/ command in the SQL buffer (short: L) &lt;br /&gt;PROMPT - Display a text string on the screen. Eg prompt Hello World!!! &lt;br /&gt;RUN - List and Run the command stored in the SQL buffer (short: /) &lt;br /&gt;SAVE - Saves command in the SQL buffer to a file. Eg "save x" will create a script file called x.sql &lt;br /&gt;SET - Modify the SQL*Plus environment eg. SET PAGESIZE 23 &lt;br /&gt;SHOW - Show environment settings (short: SHO). Eg SHOW ALL, SHO PAGESIZE etc. &lt;br /&gt;SPOOL - Send output to a file. Eg "spool x" will save STDOUT to a file called x.lst &lt;br /&gt;START - Run a SQL script file (short: @)&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;source :&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;http://www.orafaq.com/wiki/SQL*Plus_FAQ&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-1201713850758820279?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/1201713850758820279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=1201713850758820279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1201713850758820279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1201713850758820279'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/04/common-sqlplus-commands.html' title='Common sqlplus commands'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-8155979724482067046</id><published>2009-04-20T13:54:00.001+05:30</published><updated>2009-04-20T13:55:56.006+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='dba'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle - Default Location for data files</title><content type='html'>&lt;p&gt;&lt;strong&gt;To get the existing location&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;sql &gt; show parameter db_create;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;To set a new location&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;sql&gt; alter system set db_create_file_dest='/home/ssinghal/oradata';&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-8155979724482067046?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/8155979724482067046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=8155979724482067046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8155979724482067046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8155979724482067046'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/04/oracle-default-location-for-data-files.html' title='Oracle - Default Location for data files'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3840821903780000591</id><published>2009-04-08T13:59:00.001+05:30</published><updated>2009-04-08T14:00:19.064+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>Vim - Reduce Backslashing</title><content type='html'>&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;Appending a "\v" reduces the amount of backslashing the search expressions.&lt;br /&gt;&lt;br /&gt;/codes\(\n\|\s\)*where : normal regexp&lt;br /&gt;/\vcodes(\n|\s)*where  : very magic&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;source :&lt;br /&gt;http://vim.wikia.com/wiki/Best_Vim_Tips&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-3840821903780000591?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3840821903780000591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3840821903780000591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3840821903780000591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3840821903780000591'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/04/vim-reduce-backslashing.html' title='Vim - Reduce Backslashing'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-2446762504735332809</id><published>2009-04-07T14:04:00.004+05:30</published><updated>2009-04-17T14:32:30.702+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>Vim - Open Current File in Explorer or Command Prompt</title><content type='html'>Put the following two lines in your vimrc files under window to get F11 and F12 to work as "command prompt here" and "explorer here" !&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;map  :silent !start cmd.exe /k pushd %:p:h&lt;br /&gt;map  :silent !start explorer.exe %:p:h&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;source for tip1&lt;br /&gt;&lt;p&gt;"http://vim.wikia.com/wiki/Open_the_folder_containing_the_currently_open_file"&lt;/p&gt;&lt;p&gt;source for tip2&lt;/p&gt;&lt;p&gt;A variant of tip 1 using windows trick of adding a registry for folders to open a command prompt &lt;/p&gt;Note : % represents the file open in current buffer&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-2446762504735332809?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/2446762504735332809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=2446762504735332809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/2446762504735332809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/2446762504735332809'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/04/vim-open-current-file-in-explorer-or.html' title='Vim - Open Current File in Explorer or Command Prompt'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3288582985719639906</id><published>2009-04-06T13:57:00.002+05:30</published><updated>2009-04-06T13:57:49.461+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='dba'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle dba_jobs : Breaking</title><content type='html'>exec dbms_job.broken(690,true);&lt;br /&gt;&lt;br /&gt;where 690 is the job number obtained from &lt;br /&gt;select * from dba_jobs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-3288582985719639906?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3288582985719639906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3288582985719639906' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3288582985719639906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3288582985719639906'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/04/oracle-dbajobs-breaking.html' title='Oracle dba_jobs : Breaking'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3974679018741370466</id><published>2009-04-06T13:54:00.004+05:30</published><updated>2009-04-06T13:56:45.131+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='dba'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle databases - startup and shutdown</title><content type='html'>Shutdown:&lt;br /&gt;&lt;br /&gt;$ export ORACLE_SID=db_sid&lt;br /&gt;$ sqlplus /nolog&lt;br /&gt;sql&gt; connect / as sysdba&lt;br /&gt;sql&gt; shutdown immediate&lt;br /&gt;&lt;br /&gt;Startup :&lt;br /&gt;&lt;br /&gt;$ export ORACLE_SID=db_sid&lt;br /&gt;$ sqlplus /nolog&lt;br /&gt;sql&gt; connect / as sysdba&lt;br /&gt;sql&gt; startup mount&lt;br /&gt;sql&gt; alter database open;&lt;br /&gt;&lt;br /&gt;Note: This needs to be done by logging on the machine where oracle database is installed&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-3974679018741370466?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3974679018741370466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3974679018741370466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3974679018741370466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3974679018741370466'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/04/oracle-databases-startup-and-shutdown.html' title='Oracle databases - startup and shutdown'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-2713242055717577979</id><published>2009-02-24T18:58:00.000+05:30</published><updated>2009-02-24T18:59:43.068+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>marks in vim - bookmarks</title><content type='html'>- Go to a line where you want a mark and press mx - this will create a bookmark&lt;br /&gt;&lt;br /&gt;( x can be any alphabet from a-z)&lt;br /&gt;&lt;br /&gt;- Now navigate away from that place. If you need to get back to the earlier cursor location press "`x" (back-tick and x)&lt;br /&gt;&lt;br /&gt;- You can set multiple "marks" in a single file and navigate using back-tick and the alphabet used to create a mark&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-2713242055717577979?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/2713242055717577979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=2713242055717577979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/2713242055717577979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/2713242055717577979'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/02/marks-in-vim-bookmarks.html' title='marks in vim - bookmarks'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3566657201460863484</id><published>2009-02-16T16:13:00.000+05:30</published><updated>2009-02-16T16:14:00.755+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Cron entry for other users</title><content type='html'>Execute the following as root : &lt;br /&gt;&lt;br /&gt;cat /var/spool/cron/ssinghal&lt;br /&gt;&lt;br /&gt;where ssinghal is the user name&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-3566657201460863484?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3566657201460863484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3566657201460863484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3566657201460863484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3566657201460863484'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/02/cron-entry-for-other-users.html' title='Cron entry for other users'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-8465464791673598528</id><published>2009-02-06T11:36:00.002+05:30</published><updated>2009-02-06T11:39:19.347+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>Sed - Deleting lines matching a pattern</title><content type='html'>sed -i '/.*log$/d' file_names.txt&lt;br /&gt;&lt;br /&gt;Deletes all the lines ending with "log" from the file "file_names.txt"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-8465464791673598528?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/8465464791673598528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=8465464791673598528' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8465464791673598528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8465464791673598528'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/02/sed-deleting-lines-matching-pattern.html' title='Sed - Deleting lines matching a pattern'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-4547902322752125399</id><published>2009-01-27T08:29:00.002+05:30</published><updated>2009-02-16T16:23:32.641+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>marks in vim - bookmarks</title><content type='html'>Go to a line where you want a mark and press mx - this will create a bookmark&lt;br /&gt;&lt;br /&gt;( x can be any alphabet from a-z)&lt;br /&gt;&lt;br /&gt;- Now navigate away from that place. If you need to get back to the earlier cursor location press "`x" (back-tick and x)&lt;br /&gt;&lt;br /&gt;- You can set multiple "marks" in a single file and navigate using back-tick and the alphabet used to create a mark&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-4547902322752125399?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/4547902322752125399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=4547902322752125399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/4547902322752125399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/4547902322752125399'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/01/marks-in-vim-bookmars.html' title='marks in vim - bookmarks'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3433413936543003664</id><published>2009-01-26T21:39:00.004+05:30</published><updated>2009-01-26T21:43:13.189+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>sed : inplace replacement</title><content type='html'>&lt;p&gt;It is easy to open a file in vim and do a search replace - but if the file runs into huge sizes, a regular editor would not be able to perform search and replace tasks on it efficiently. For these situation, you need a "stream" editor. Here is an example for replacing "foo" with "bar" in a file called snafu.txt&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;code&gt;sed -i -e 's/foo/bar/g' snafu.txt&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Where:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-i : Is for inplace replacement&lt;/p&gt;&lt;p&gt;-e: sed script to be run on the file&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-3433413936543003664?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3433413936543003664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3433413936543003664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3433413936543003664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3433413936543003664'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/01/sed-inplace-replacement.html' title='sed : inplace replacement'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-3265361695139871487</id><published>2009-01-26T21:21:00.001+05:30</published><updated>2009-01-26T21:36:18.912+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>samba mount</title><content type='html'>&lt;p&gt;Using samba to mount a windows shared folder&lt;/p&gt;&lt;p&gt;mount -t cifs -o username=Home\\sandeep //192.168.0.1/Shared/ /media/Shared&lt;/p&gt;&lt;p&gt;Where /media/Shared is the target folder where the network folder will be mounted.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-3265361695139871487?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/3265361695139871487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=3265361695139871487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3265361695139871487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/3265361695139871487'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/01/samba-mount.html' title='samba mount'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-6971389213045090119</id><published>2009-01-25T18:49:00.001+05:30</published><updated>2009-01-25T18:51:05.554+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Executing a command remotely using ssh</title><content type='html'>&lt;p&gt;Following command will run a shell script on a remote machine&lt;/p&gt;&lt;p&gt;ssh ssinghal@192.168.0.1 /tomcat/jakarta/bin/kill.sh&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-6971389213045090119?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/6971389213045090119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=6971389213045090119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/6971389213045090119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/6971389213045090119'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2009/01/executing-command-remotely-using-ssh.html' title='Executing a command remotely using ssh'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-1494008021137699453</id><published>2008-12-26T12:31:00.002+05:30</published><updated>2008-12-26T12:42:18.237+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Capturing output of terminal on Unix</title><content type='html'>Terminals do not have a great scroll length and even though you can increase the number of lines that can be scrolled up, it is always useful to have the output captured in a file so that you can search on it. Here are few ways&lt;br /&gt;&lt;br /&gt;1. Redirection&lt;br /&gt;&lt;br /&gt;cat foo.txt &gt; bar.txt&lt;br /&gt;&lt;br /&gt;Outout of foo.txt is captured in bar.txt&lt;br /&gt;&lt;br /&gt;2. Redirection with "append"&lt;br /&gt;&lt;br /&gt;ls &gt;&gt; bar.txt&lt;br /&gt;&lt;br /&gt;This will append the output of "ls" to bar.txt ( Instead of overwriting it)&lt;br /&gt;&lt;br /&gt;3. "tee"&lt;br /&gt;Redirect and redirect with append will not display the content on console and hence if you want to see the content and also redirect it to a file , use "tee"&lt;br /&gt;&lt;br /&gt;ls | tee bar.txt&lt;br /&gt;&lt;br /&gt;this will display the contents of ls on terminal and also redirect it to bar.txt&lt;br /&gt;&lt;br /&gt;4. output to multiple files &lt;br /&gt;&lt;br /&gt;ls | tee a.txt b.txt c.txt&lt;br /&gt;&lt;br /&gt;This will output contents of ls to a.txt, b.txt, c.txt&lt;br /&gt;&lt;br /&gt;5. Outout all the terminal interaction to a file&lt;br /&gt;&lt;br /&gt;script -f out.txt&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-1494008021137699453?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/1494008021137699453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=1494008021137699453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1494008021137699453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1494008021137699453'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2008/12/capturing-output-of-terminal-on-unix.html' title='Capturing output of terminal on Unix'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-8633190730303505669</id><published>2008-12-22T08:57:00.003+05:30</published><updated>2008-12-22T09:05:26.572+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='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Converting UTF-16 to UTF-8</title><content type='html'>I was running grep on an xml file (big one) and realized that it did not match the pattern I was expecting the the file. I then did a "head" from the file to see a pattern that is present in it. Grepping on that too returned nothing telling me that grep is somehow not working on this file.&lt;br /&gt;"head" was returning some junk characters at the begining of the file - This idicated that the file does not have a normal text encoding and probably that is the reason why grep is not working on it.&lt;br /&gt;Reading the XML header proved that, since it was "UTF-18", grep was not running over it. I had to convert the file to UTF-8 which is more text friendly if the content is only English.&lt;br /&gt;&lt;br /&gt;iconv --from-code UTF-16 --to-code UTF-8 input_file.xml &gt; output_file.xml&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-8633190730303505669?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/8633190730303505669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=8633190730303505669' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8633190730303505669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/8633190730303505669'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2008/12/converting-utf-16-to-utf-8.html' title='Converting UTF-16 to UTF-8'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-1687556981992506349</id><published>2008-12-13T21:14:00.001+05:30</published><updated>2008-12-13T21:14:46.736+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>screen</title><content type='html'>when to I use screen :&lt;br /&gt;&lt;br /&gt; * When "nohup" is just not enough&lt;br /&gt; * When the power goes off and you are left in the middle of nowhere&lt;br /&gt; * When I need to log on to 10 different terminals each day&lt;br /&gt; * When I do not want to enter 10 different username passwords each day&lt;br /&gt;&lt;br /&gt;"screen" is a terrific unix utility that allows you to start a terminal without having to worry about you job being interreputed mid-way. It is better than nohup in that respect  nohup only allows unix commands to be started in a "nohup" fashion. If for instance you are working with an interactive program like sqlplus and your internet connection happen to break, you will loose your context and any transactions that you were working on.&lt;br /&gt;&lt;br /&gt;It essentially allows you following : &lt;br /&gt; * Multiple sessions in a single ssh window (screen multiplexing)&lt;br /&gt; * Ability to "resume" a session in the state you left it - irrespective of power outage, internet connection termination etc&lt;br /&gt;&lt;br /&gt;Here is how you use it :&lt;br /&gt;&lt;br /&gt;1. Make sure it is installed on your system by typing "screen --help"&lt;br /&gt;2. If it is not installed, you can install it by "yum install screen" on a fedora box.&lt;br /&gt;3. start a screen session by typing "screen" and you should be in a screen session.&lt;br /&gt;4. If you are disconnected or closed the terminal, type "screen -r -d" to reattach to the session&lt;br /&gt;&lt;br /&gt;Here are some of the short-cuts available (All after CTRL+A)&lt;br /&gt;&lt;br /&gt;  c : creates a new&lt;br /&gt;  n : next screen window&lt;br /&gt;  p : previous screen window&lt;br /&gt;  a : toggle between two screen windows&lt;br /&gt;  [0-9] : Go to a specific screen window identified by a number&lt;br /&gt;  A : Set the name of a screen window&lt;br /&gt;  " : List all the existing screen&lt;br /&gt;  ESC : Scroll up or down on a screen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-1687556981992506349?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/1687556981992506349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=1687556981992506349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1687556981992506349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1687556981992506349'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2008/12/screen.html' title='screen'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-1874199836251912285</id><published>2008-11-15T11:03:00.003+05:30</published><updated>2008-11-15T11:10:49.944+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cricket'/><category scheme='http://www.blogger.com/atom/ns#' term='india'/><title type='text'>Man on the moon (well almost)</title><content type='html'>India becomes the 4th Nation to put a lunar probe on the moon ! I am proud to be the 4th country to do that(as against the alleged 3rd world country banter from Matthew Hayden who knows nothing more than being a sore loser)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-1874199836251912285?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/1874199836251912285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=1874199836251912285' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1874199836251912285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/1874199836251912285'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2008/11/man-on-moon-well-almost.html' title='Man on the moon (well almost)'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6820481775641762988.post-6739137775161073771</id><published>2008-10-19T09:18:00.002+05:30</published><updated>2008-10-19T09:19:52.374+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>pasting code in vim</title><content type='html'>:set paste &lt;br /&gt;&lt;br /&gt;paste the code &lt;br /&gt;&lt;br /&gt;:set nopaste&lt;br /&gt;&lt;br /&gt;set pastetoggle=F3 in your vimrc file is an alternative.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6820481775641762988-6739137775161073771?l=compdottech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://compdottech.blogspot.com/feeds/6739137775161073771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=6820481775641762988&amp;postID=6739137775161073771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/6739137775161073771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6820481775641762988/posts/default/6739137775161073771'/><link rel='alternate' type='text/html' href='http://compdottech.blogspot.com/2008/10/pasting-code-in-vim.html' title='pasting code in vim'/><author><name>sandeep</name><uri>http://www.blogger.com/profile/07733361360323444151</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02831029713663892329'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>