<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techgyan</title>
	<atom:link href="http://techgyan.im/feed/" rel="self" type="application/rss+xml" />
	<link>http://techgyan.im</link>
	<description>Websites,Tricks,Linux,Technology</description>
	<lastBuildDate>Fri, 13 Aug 2010 12:14:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Find command simplified</title>
		<link>http://techgyan.im/2010/08/find-command-simplified/</link>
		<comments>http://techgyan.im/2010/08/find-command-simplified/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 12:10:03 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[find]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=390</guid>
		<description><![CDATA[Find is a very powerful command on linux and one should know how to use it and exploit its power. I would be stating some examples here by which you guys will get a fair idea about how to use the command. First the default syntax of find.  find pathname(s) conditions(s) pathnames refers to the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Ffind-command-simplified%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Ffind-command-simplified%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Find is a very powerful command on linux and one should know how to use it and exploit its power. I would be stating some examples here by which you guys will get a fair idea about how to use the command. First the default syntax of find. </p>
<pre><strong>find pathname(s) conditions(s)</strong></pre>
<p><strong>pathnames</strong> refers to the location where you are searching for the file.<strong> condtitions </strong>refers to conditions for searching the files. Conditions may be grouped by enclosing them in <code><strong>\( \)</strong></code> (escaped parentheses), negated with <code><strong>!</strong></code> (use <code><strong>\!</strong></code> in the C shell), given as alternatives by separating them with <code>-o</code>, or repeated (adding restrictions to the match; usually only for <code>-name</code>, <code>-type</code>, and <code>-perm</code>). </p>
<h3>Conditions</h3>
<dl>
<dt><code>-atime</code> <code><strong>+</strong></code><em>n</em> | <code><strong>-</strong></code><em>n</em> | <em>n</em> </dt>
<dd>Find files that were last accessed more than <em>n</em> (<code><strong>+</strong></code><em>n</em>), less than <em>n</em> (<code><strong>-</strong></code><em>n</em>), or exactly <em>n</em> days ago. Note that <kbd>find</kbd> will change the access time of directories supplied as <em>pathnames</em>. </dd>
<dd></dd>
<dt><code>-cpio</code> <em>dev</em> </dt>
<dd>Take matching files and write them on device <em>dev</em>, using <kbd>cpio</kbd>. Obsolete.</dd>
<dd></dd>
<dt><code>-ctime</code> <code><strong>+</strong></code><em>n</em> | <code><strong>-</strong></code><em>n</em> | <em>n</em> </dt>
<dd>Find files that were changed more than <em>n</em> (<code><strong>+</strong></code><em>n</em>), less than <em>n</em> (<code><strong>-</strong></code><em>n</em>), or exactly <em>n</em> days ago. Change refers to modification, permission or ownership changes, etc.; therefore, <code>-ctime</code> is more inclusive than <code>-atime</code> or <code>-mtime</code>.</dd>
<dd></dd>
<dt><code>-depth</code> </dt>
<dd>Descend the directory tree, skipping directories and working on actual files first (and <em>then</em> the parent directories). Useful when files reside in unwritable directories (e.g., when using <kbd>find</kbd> with <kbd>cpio</kbd>).</dd>
<dd></dd>
<dt><code>-exec</code> <em>command</em> <code><strong>{} \;</strong></code> </dt>
<dd>Run the Unix <em>command</em> on each file matched by <kbd>find</kbd>, provided <em>command</em> executes successfully on that file; i.e., returns a 0 exit status. When <em>command</em> runs, the argument <code><strong>{}</strong></code> substitutes the current file. Follow the entire sequence with an escaped semicolon (<code><strong>\;</strong></code>).  </dd>
<dd></dd>
<dt><code>-follow</code> </dt>
<dd>Follow symbolic links and track the directories visited (don&#8217;t use this with <code>-type l</code>).</dd>
<dd></dd>
<dt><code>-fstype</code> <em>type</em> </dt>
<dd>Find files that reside on filesystems of type <code><strong>type</strong></code>.</dd>
<dd></dd>
<dt><code>-group</code> <em>gname</em> </dt>
<dd>Find files belonging to group <em>gname</em>. <em>gname</em> can be a group name or a group ID number. </dd>
<dd></dd>
<dt><code>-inum</code> <em>n</em> </dt>
<dd>Find files whose inode number is <em>n</em>.</dd>
<dd></dd>
<dt><code>-links</code> <em>n</em> </dt>
<dd>Find files having <em>n</em> links.  </dd>
<dd></dd>
<dt><code>-local</code> </dt>
<dd>Find files that physically reside on the local system.  </dd>
<dd></dd>
<dt><code>-ls</code> </dt>
<dd>Display matching files with associated statistics (as if run through <code><strong>ls -lids</strong></code>).</dd>
<dd></dd>
<dt><code>-mount</code> </dt>
<dd>Search for files that reside only on the same filesystem as <em>pathname</em>.</dd>
<dd></dd>
<dt><code>-mtime</code> <code><strong>+</strong></code><em>n</em> | <code><strong>-</strong></code><em>n</em> | <em>n</em> </dt>
<dd>Find files that were last modified more than <em>n</em> (<code><strong>+</strong></code><em>n</em>), less than <em>n</em> (<code><strong>-</strong></code><em>n</em>), or exactly <em>n</em> days ago.</dd>
<dd></dd>
<dt><code>-name</code> <em>pattern</em> </dt>
<dd>Find files whose names match <em>pattern</em>. Filename metacharacters may be used, but should be escaped or quoted. </dd>
<dd></dd>
<dt><code>-ncpio</code> <em>dev</em> </dt>
<dd>Take matching files and write them on device <em>dev</em>, using <code><strong>cpio -c</strong></code>. Obsolete.</dd>
<dd></dd>
<dt><code>-newer</code> <em>file</em> </dt>
<dd>Find files that have been modified more recently than <em>file</em>; similar to <code>-mtime</code>.  </dd>
<dd></dd>
<dt><code>-nogroup</code> </dt>
<dd>Find files belonging to a group <em>not</em> in <em>/etc/group</em>.</dd>
<dd></dd>
<dt><code>-nouser</code> </dt>
<dd>Find files owned by a user <em>not</em> in <em>/etc/passwd</em>.  </dd>
<dd></dd>
<dt><code>-ok</code> <em>command</em> <code><strong>{} \;</strong></code> </dt>
<dd>Same as <code>-exec</code>, but user must respond (with a <code><strong>y</strong></code>) before <em>command</em> is executed. </dd>
<dd></dd>
<dt><code>-perm</code> <em>nnn</em> </dt>
<dd>Find files whose permission settings (e.g., <code><strong>rwx</strong></code>) match octal number <em>nnn</em> exactly (e.g., 664 matches <code><strong>-rw-rw-r--</strong></code>). Use a minus sign to make a wildcard match of any specified bit (e.g., <code><strong>-perm -600</strong></code> matches <code><strong>-rw******</strong></code>, where * can be any mode). Some systems also allow <code><strong>+</strong></code><em>nnn</em> for this purpose.</dd>
<dd></dd>
<dt><code>-print</code> </dt>
<dd>Print the matching files and directories, using their full pathnames.</dd>
<dd></dd>
<dt><code>-prune</code> </dt>
<dd>&#8220;Prune&#8221; the directory tree of unwanted directory searches; that is, skip the directory most recently matched.</dd>
<dd></dd>
<dt><code>-size</code> <em>n</em>[<code><strong>c</strong></code>] </dt>
<dd>Find files containing <em>n</em> blocks, or, if <code><strong>c</strong></code> is specified, files that are <em>n</em> characters (bytes) long. (One block = 512 bytes).  </dd>
</dl>
<p> </p>
<dl>
<dt><code>-type</code> <em>c</em> </dt>
<dd>Find files whose type is <em>c</em>. <em>c</em> can be:</p>
<table border="1" cellpadding="3">
<tbody>
<tr valign="top">
<td><code><strong>b</strong></code></td>
<td>Block special file</td>
</tr>
<tr valign="top">
<td><code><strong>c</strong></code></td>
<td>Character special file</td>
</tr>
<tr valign="top">
<td><code><strong>d</strong></code></td>
<td>Directory</td>
</tr>
<tr valign="top">
<td><code><strong>D</strong></code></td>
<td>Door special file, Solaris only</td>
</tr>
<tr valign="top">
<td><code><strong>f</strong></code></td>
<td>Plain file</td>
</tr>
<tr valign="top">
<td><code><strong>l</strong></code></td>
<td>Symbolic link</td>
</tr>
<tr valign="top">
<td><code><strong>p</strong></code></td>
<td>Fifo or named pipe</td>
</tr>
<tr valign="top">
<td><code><strong>s</strong></code></td>
<td>Socket</td>
</tr>
</tbody>
</table>
</dd>
<dt><code>-user</code> <em>user</em> </dt>
<dd>Find files belonging to a <em>user</em> name or ID.  </dd>
<p> </p>
</dl>
<h3>Examples</h3>
<p>List all files (and subdirectories) in your home directory: <br />
 <code><strong>find $HOME -print</strong></code>  </p>
<p>List all files named <em>chapter1</em> underneath the <em>/work</em> directory:  </p>
<p><code><strong>find /work -name chapter1 -print</strong></code>  </p>
<p> List &#8220;memo&#8221; files owned by <code><strong>ann</strong></code> (note the use of multiple starting paths):  </p>
<p><code><strong>find /work /usr -name 'memo*' -user ann -print</strong></code> </p>
<p>Search the filesystem (begin at root) for manpage directories: </p>
<p> <code><strong>find / -type d -name 'man*' -print</strong></code></p>
<p>Search the current directory, look for filenames that don&#8217;t begin with a capital letter, and send them to the printer:</p>
<p><code><strong>find . \! -name '[A-Z]*' -exec lp {} \;</strong></code></p>
<p>Find and compress files whose names don&#8217;t end with <code><strong>.Z</strong></code>:</p>
<p><code><strong>compress `find . -type f \! -name '*.Z' -print`</strong></code></p>
<p>Remove all empty files on the system (prompting first):</p>
<p><code><strong>find / -size 0 -ok rm {} \;</strong></code></p>
<p>Skip RCS directories, but list remaining read-only files:</p>
<p><code><strong>find . -name RCS -prune -o -perm 444 -print</strong></code> </p>
<p>Search the system for files that were modified within the last two days (good candidates for backing up): </p>
<p> <code><strong>find / -mtime -2 -print</strong></code></p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=390">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/08/find-command-simplified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Completion Features of Vim</title>
		<link>http://techgyan.im/2010/08/auto-completion-features-of-vim/</link>
		<comments>http://techgyan.im/2010/08/auto-completion-features-of-vim/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 13:32:32 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[tweaks]]></category>
		<category><![CDATA[vim tweaks]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=378</guid>
		<description><![CDATA[This is in continuation with the previous post of mine on Vim tips and tricks. The auto completion feature is an excellent feature of Vim. There are four types of Auto completion features of Vim: Word / Pattern Completion in Vi / Vim Using Ctrl-x Ctrl-n Line Completion in Vim using Ctrl-x Ctrl-l File Name [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Fauto-completion-features-of-vim%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Fauto-completion-features-of-vim%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This is in continuation with the previous post of mine on Vim tips and tricks. The auto completion feature is an excellent feature of Vim. There are four types of Auto completion features of Vim:</p>
<ul>
<li>Word / Pattern Completion in Vi / Vim Using Ctrl-x Ctrl-n</li>
<li>Line Completion in Vim using Ctrl-x Ctrl-l</li>
<li>File Name Completion Using Ctrl-x Ctrl-f</li>
<li>Dictionary Word Completion Using Ctrl-x Ctrl-k</li>
</ul>
<h3><strong>Word / Pattern Completion in Vi / Vim Using Ctrl-x Ctrl-n</strong></h3>
<p>You can use one of the following Vim shortcut keys to choose the existing words on the file.</p>
<ul>
<li>CTRL-x CTRL-n : Word completion – forward</li>
<li>CTRL-x CTRL-p : Word completion – backward</li>
</ul>
<p><a href="http://techgyan.im/wp-content/uploads/2010/08/1.png"><img class="alignleft size-medium wp-image-379" title="1" src="http://techgyan.im/wp-content/uploads/2010/08/1-300x210.png" alt="" width="300" height="210" /></a><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
Typical usage for programmers and administrators:</p>
<ul>
<li>Complete an existing word in the file, without retyping it.</li>
<li>Complete a variable name or a function name on your program or shell-scripts.</li>
</ul>
<h3>Line Completion in Vim using Ctrl-x Ctrl-l</h3>
<p>If you want to insert an existing line, type the first few words/characters of the line, and then press the Vim shortcut keys “Ctrl+x Ctrl+l”, which will display all the lines matching that patten. Note: The second control character is a lowercase L.</p>
<p>Typical usage for a programmers and administrators:</p>
<ul>
<li>Repeat an existing line quickly in your file.</li>
<li>Automatically fill first line of the function definition, when the function is already declared elsewhere in the same file.</li>
</ul>
<h3><strong>File Name Completion Using Ctrl-x Ctrl-f</strong></h3>
<p>Insert the name of the file that resides anywhere on the Linux system using the short cut key “Ctrl+x Ctrl+f”.</p>
<p><a href="http://techgyan.im/wp-content/uploads/2010/08/2.png"><img class="alignleft size-medium wp-image-380" title="2" src="http://techgyan.im/wp-content/uploads/2010/08/2-300x210.png" alt="" width="300" height="210" /></a><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
Typical usage: When you give the path of the file name as a reference inside a document.</p>
<p><br/></p>
<h3>Dictionary Word Completion Using Ctrl-x Ctrl-k</h3>
<p>Enable the dictionary in Vim by adding the following line to ~/.vimrc.</p>
<pre><strong>set dictionary+=/usr/share/dict/words</strong></pre>
<p>This is a great feature when you stumble for the correct spelling for a word that you are typing. After typing the first few characters, Press the Vim short cut key Ctrl-x Ctrl-k to display the matching dictionary words.</p>
<p><a href="http://techgyan.im/wp-content/uploads/2010/08/3.png"><img class="alignleft size-medium wp-image-381" title="3" src="http://techgyan.im/wp-content/uploads/2010/08/3-300x210.png" alt="" width="300" height="210" /></a><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/><br />
<br/></p>
<p>PS: Drop your comments, if you need any further clarrifications!</p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=378">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/08/auto-completion-features-of-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim Tweaks &#8211; Part 1</title>
		<link>http://techgyan.im/2010/08/vim-tweaks-part-1/</link>
		<comments>http://techgyan.im/2010/08/vim-tweaks-part-1/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 18:17:20 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[vim tweaks]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=371</guid>
		<description><![CDATA[Well to be honest I never liked Vim before, always used to use gedit! Of late I have realized the power of the Vim editor and in love with it! To pimp your editor you just need to modify your .vimrc file, it is nothing but the configuration file. This would be located in your [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Fvim-tweaks-part-1%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Fvim-tweaks-part-1%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Well to be honest I never liked Vim before, always used to use gedit! Of late I have realized the power of the Vim editor and in love with it! To pimp your editor you just need to modify your <strong>.vimrc </strong>file, it is nothing but the configuration file. This would be located in your <strong>/home/&lt;user-name&gt; </strong>folder. If this file does not exist, you got to create one. I have currently done some tweaking, and will explain in multiple parts.</p>
<p>My vimrc file:</p>
<div id="_mcePaste">
<div id="_mcePaste"><strong>set nocp</strong></div>
<div id="_mcePaste"><strong>syntax on</strong></div>
<div id="_mcePaste"><strong>set nu</strong></div>
<div id="_mcePaste"><strong>set sw=4</strong></div>
<div id="_mcePaste"><strong>set ts=4</strong></div>
<div id="_mcePaste"><strong>set ru</strong></div>
<div id="_mcePaste"><strong>set nowrap</strong></div>
<div id="_mcePaste"><strong>set spr</strong></div>
<div id="_mcePaste"><strong>set bs=2</strong></div>
<div id="_mcePaste"><strong>set noeb</strong></div>
<div id="_mcePaste"><strong>set vb t_vb=</strong></div>
<div id="_mcePaste"><strong>set expandtab</strong></div>
<div id="_mcePaste"><strong>set ai</strong></div>
<div id="_mcePaste"><strong>set si</strong></div>
<div id="_mcePaste"><strong>map &lt;silent&gt; &lt;F2&gt; :w&lt;CR&gt;</strong></div>
<div id="_mcePaste"><strong>map &lt;silent&gt; &lt;F5&gt; &lt;F2&gt;:let cmd = matchstr(getline(1), &#8216;[^!]*$&#8217;) . &#8221; &#8221; . \bufname(&#8220;%&#8221;)&lt;CR&gt;&lt;F6&gt; \gg&lt;ESC&gt;:exe &#8220;r!&#8221; . cmd&lt;CR&gt;&lt;ESC&gt;o&lt;ESC&gt;</strong></div>
<div><strong>map &lt;silent&gt; &lt;F6&gt; &lt;C-W&gt;p</strong></div>
<div id="_mcePaste"><strong>map &lt;silent&gt; &lt;F7&gt; u&lt;F6&gt;</strong></div>
<div id="_mcePaste"><strong>imap &lt;silent&gt; &lt;F2&gt; &lt;ESC&gt;&lt;F2&gt; </strong><span style="white-space: pre;"><strong> </strong></span></div>
<div id="_mcePaste"><strong>imap &lt;silent&gt; &lt;F5&gt; &lt;ESC&gt;&lt;F5&gt;</strong><span style="white-space: pre;"><strong> </strong></span></div>
<div id="_mcePaste"><strong>imap &lt;silent&gt; &lt;F6&gt; &lt;ESC&gt;&lt;F6&gt;</strong></div>
<div id="_mcePaste"><strong>imap &lt;silent&gt; &lt;F7&gt; &lt;ESC&gt;&lt;F7&gt;</strong></div>
<div>
<br/><br />
What does my config file do??</div>
<div>1) <strong>F2 </strong>- save feature <img src='http://techgyan.im/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (Turbo C Style)</div>
<div>2) Now, to execute and see the output of your scripts in the same screen, first split the windows into 2. You can do that by typing <strong>new split </strong>in the command mode! To switch between the windows, press <strong>ctrl-ww.</strong></div>
<div>3) After you are done splitting, press <strong>F5 </strong>execute your script. You will see the output in the other window. <img src='http://techgyan.im/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div>4) Press <strong>F7 </strong>to clear the output screen and return back to the script window.</div>
<div>5) <strong>F6- </strong>switch between the  two windows.</div>
<div>Remember, while executing the script i.e before pressing <strong>F5,</strong> make sure the cursor is in the script window!</div>
<div>A sample screenshot below:</div>
<div><a href="http://techgyan.im/wp-content/uploads/2010/08/temp.png"><img class="alignnone size-medium wp-image-372" title="temp" src="http://techgyan.im/wp-content/uploads/2010/08/temp-300x170.png" alt="" width="300" height="170" /></a></div>
<div>Click to see the larger image!</div>
<div>Will post the next set of tweaks sometime soon.</div>
</div>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=371">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/08/vim-tweaks-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A script to print your machine details</title>
		<link>http://techgyan.im/2010/08/a-script-to-print-your-machine-details/</link>
		<comments>http://techgyan.im/2010/08/a-script-to-print-your-machine-details/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 20:47:10 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=364</guid>
		<description><![CDATA[Sorry, I have not been finding time to write any posts of late:( Anyways, here s a script which you can run to print your machine details:) No fundoo stuff, just some commands which I knew put together into a shell script! Here is the script: #!/bin/sh echo -e "\nMachine information:" ; uname -a echo [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Fa-script-to-print-your-machine-details%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F08%2Fa-script-to-print-your-machine-details%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Sorry, I have not been finding time to write any posts of late:( Anyways, here s a script which you can run to print your machine details:) No fundoo stuff, just some commands which I knew put together into a shell script!</p>
<p>Here is the script:</p>
<p><code>#!/bin/sh<br />
echo -e "\nMachine information:" ; uname -a<br />
echo -e "\nUsers logged on:" ; w -h<br />
echo -e "\nCurrent date :" ; date<br />
echo -e "\nMachine status :" ; uptime<br />
echo -e "\nMemory status :" ; free<br />
echo -e "\nFilesystem status :"; df -h</code></p>
<p>Save the above file with .sh extension. Give execute permissions for the script, by using chmod.</p>
<p><strong>TIP:</strong></p>
<p>If you need this command to work like a normal unix command on your terminal, then follow the steps below:</p>
<ol>
<li>Save the file as machinfo.sh</li>
<li><code>chmod 777 machinfo.sh</code></li>
<li><code>sudo cp machinfo.sh /bin</code></li>
<li>Type <strong>bash</strong> in your terminal and press ENTER.</li>
<li>You can now type <strong>machinfo.sh</strong> on your terminal from now on to print your machine information <img src='http://techgyan.im/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ol>
<p>PS: Drop comments if you face any problem!</p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=364">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/08/a-script-to-print-your-machine-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple HTTP server with Python</title>
		<link>http://techgyan.im/2010/05/a-simple-http-server-with-python/</link>
		<comments>http://techgyan.im/2010/05/a-simple-http-server-with-python/#comments</comments>
		<pubDate>Thu, 27 May 2010 05:24:35 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=361</guid>
		<description><![CDATA[Recently i wanted to share a file to one of my friends who was on the same network and i was looking for a simple way to that and this command came into help. Here&#8217;s how you do it. If you need a quick web server running and you don&#8217;t want to mess with setting [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F05%2Fa-simple-http-server-with-python%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F05%2Fa-simple-http-server-with-python%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently i wanted to share a file to one of my friends who was on the same network and i was looking for a simple way to that and this command came into help. Here&#8217;s how you do it.</p>
<p>If you need a quick web server running and you don&#8217;t want to mess with setting up apache or something similar, then <a href="http://www.python.org/">Python</a> can help. Python comes with a simple builtin HTTP server. With the help of this little HTTP server you can turn any directory in your system into your web server directory. The only thing you need to have installed is Python.</p>
<p>Practically speaking this is very useful to share files inside your local network. Implementing this tiny but hugely useful HTTP server is very simple, its just a single line command.</p>
<p>Assume that I would like to share the directory <tt>/home/pradeep</tt> and my IP address is 192.168.1.2</p>
<p>Open up a terminal and type:<br />
<code>cd /home/somedir</code><br />
<code>python -m SimpleHTTPServer.py</code></p>
<p>That&#8217;s it! Now your http server will start in port 8000.  You will get the message:<br />
<code>Serving HTTP on 0.0.0.0 port 8000 ...</code></p>
<p>Now open a browser and type the following address:<br />
<code>http://192.168.1.2:8000</code></p>
<p>You can also access it via:<br />
<code>http://127.0.0.1:8000</code></p>
<p>If the directory has a file named <tt>index.html</tt>, that file will be served as the initial file.  If there is no <tt>index.html</tt>, then the files in the directory will be listed.</p>
<p>If you wish to change the port that&#8217;s used start the program via:<br />
<code>$ python -m SimpleHTTPServer 8080</code></p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=361">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/05/a-simple-http-server-with-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu Cheatsheet</title>
		<link>http://techgyan.im/2010/05/ubuntu-cheatsheet/</link>
		<comments>http://techgyan.im/2010/05/ubuntu-cheatsheet/#comments</comments>
		<pubDate>Sun, 23 May 2010 20:28:04 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[cheat sheet]]></category>
		<category><![CDATA[commands]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=355</guid>
		<description><![CDATA[Well its been a very long time since I have blogged. Have been busy very lately. I recently installed Ubuntu 10.04 and it&#8217;s awsome. Ubuntu keeps getting better and better. Well found this neat Ubuntu cheat sheet on my hard drive. You can download it below: ubunturef Download as PDF]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F05%2Fubuntu-cheatsheet%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F05%2Fubuntu-cheatsheet%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Well its been a very long time since I have blogged. Have been busy very lately. I recently installed Ubuntu 10.04 and it&#8217;s awsome. Ubuntu keeps getting better and better. Well found this neat Ubuntu cheat sheet on my hard drive.  You can download it below:</p>
<h2><a href="http://techgyan.im/wp-content/uploads/2010/05/ubunturef.pdf"><strong><span style="color: #ff0000;">ubunturef</span></strong></a></h2>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=355">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/05/ubuntu-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A command Line Program to Download flash Videos</title>
		<link>http://techgyan.im/2010/04/a-command-line-program-to-download-flash-videos/</link>
		<comments>http://techgyan.im/2010/04/a-command-line-program-to-download-flash-videos/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 08:48:07 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=351</guid>
		<description><![CDATA[Download videos from various Flash-based video hosting sites, without having to use the Flash player. Handy for saving videos for watching offline, and means you don’t have to keep upgrading Flash for sites that insist on a newer version of the player. Includes support for the following sites/players (and more!): * YouTube, eHow, Brightcove (used [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F04%2Fa-command-line-program-to-download-flash-videos%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F04%2Fa-command-line-program-to-download-flash-videos%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Download videos from various Flash-based video hosting sites, without having to use the Flash player. Handy for saving videos for watching offline, and means you don’t have to keep upgrading Flash for sites that insist on a newer version of the player.<br />
Includes support for the following sites/players (and more!):</p>
<p>* YouTube, eHow, Brightcove (used by many sites like Channel 4, Daily Telegraph …), BBC (news, etc), Metacafe, 5min, Google, fliqz, nicovideo, vimeo, Blip, Break, Collegehumor, Muzu, Sevenload, Megavideo etc etc.</p>
<p>* Also includes a ‘generic’ method which works on many other sites.</p>
<p><strong>Installation:</strong></p>
<blockquote><p>sudo apt-get install libwww-mechanize-perl libxml-simple-perl<br />
wget http://get-flash-videos.googlecode.com/files/get-flash-videos_1.21-1_all.deb<br />
sudo dpkg -i get-flash-videos_1.21-1_all.deb</p></blockquote>
<p><strong>get-flash-videos Syntax</strong></p>
<blockquote><p>get_flash_videos url..</p></blockquote>
<p>For more info check : <a title="get_flash_videos" href="http://code.google.com/p/get-flash-videos/" target="_blank">Project Site</a></p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=351">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/04/a-command-line-program-to-download-flash-videos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Video LightBox – Add video to your website with stylish popup video effect</title>
		<link>http://techgyan.im/2010/02/video-lightbox-%e2%80%93-add-video-to-your-website-with-stylish-popup-video-effect/</link>
		<comments>http://techgyan.im/2010/02/video-lightbox-%e2%80%93-add-video-to-your-website-with-stylish-popup-video-effect/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 04:36:49 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=347</guid>
		<description><![CDATA[Video LightBox is a free wizard program that allow you to easily embed video to your website, web page or blog with stylish popup video effect without writing a single line of code. It’s very easy to use, just follow 3 simple steps: Add Video into your Video Lightbox interface. Select the template for video [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F02%2Fvideo-lightbox-%25e2%2580%2593-add-video-to-your-website-with-stylish-popup-video-effect%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F02%2Fvideo-lightbox-%25e2%2580%2593-add-video-to-your-website-with-stylish-popup-video-effect%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Video LightBox</strong> is a free wizard program that  allow you to easily embed video to your website, web page or blog with  stylish popup video effect without writing a single line of code.</p>
<p style="text-align: center;"><strong><img class="aligncenter" title="videolightbox" src="../wp-content/uploads/2010/02/videolightbox-300x155.jpg" alt="" width="300" height="155" /></strong></p>
<p>It’s very easy to use, just follow 3 simple steps:</p>
<ol>
<li>Add  Video into your Video Lightbox interface.</li>
<li>Select the template  for video popup and video thumbnail appearance</li>
<li>and Publish…</li>
</ol>
<p>With  Video Lightbox, you can create nice image thumbnail for your video. On  click, this thumbnail expands into a stylish overlay window containing  the video. No css, html, javascript coding, no image editing, just a  couple of clicks to get the your video added to the Web.</p>
<p><strong>Features  of Video LightBox:</strong></p>
<ol>
<li>Embed flv, mp4, 3gp video files</li>
<li>Add  Youtube, Google Video, Metacafe, Vimeo, MySpace videos</li>
<li>Mac  &amp; Windows versions</li>
<li>XHTML compliant</li>
<li>Automatic  thumbnail creation</li>
<li>Easy to add caption</li>
<li>A lot of gorgeous  gallery themes</li>
<li>Built-in FTP</li>
</ol>
<ul>
<li>Website: <a title="Video Light box" href="http://videolightbox.com/" target="_blank"><strong>http://videolightbox.com</strong></a></li>
<li>Download:  <a title="Video LightBox" href="http://videolightbox.com/#down" target="_blank"><strong>http://videolightbox.com/#down</strong></a></li>
<li>Demo  : <a title="Video Lightbox" href="http://videolightbox.com/#demo" target="_blank"><strong>http://videolightbox.com/#demo</strong></a></li>
</ul>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=347">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/02/video-lightbox-%e2%80%93-add-video-to-your-website-with-stylish-popup-video-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable ask for password when browsing Windows partitions in File-browser</title>
		<link>http://techgyan.im/2010/02/disable-ask-for-password-when-browsing-windows-partitions-in-file-browser/</link>
		<comments>http://techgyan.im/2010/02/disable-ask-for-password-when-browsing-windows-partitions-in-file-browser/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 13:23:13 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=344</guid>
		<description><![CDATA[Whenever you try to open a windows partition in Ubuntu Karmic Koala, you are always asked to enter your password and it is very annoying. The following pop up always opens up In order to avoid that follow the steps below: 1) Open up the terminal and type the command below gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy 2)﻿Then,find [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F02%2Fdisable-ask-for-password-when-browsing-windows-partitions-in-file-browser%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F02%2Fdisable-ask-for-password-when-browsing-windows-partitions-in-file-browser%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Whenever you try to open a windows partition in Ubuntu Karmic Koala, you are always asked to enter your password and it is very annoying. The following pop up always opens up</p>
<p><img class="alignnone size-medium wp-image-345" title="mount_password" src="http://techgyan.im/wp-content/uploads/2010/02/mount_password1-300x161.png" alt="" width="300" height="161" /></p>
<p>In order to avoid that follow the steps below:</p>
<p>1) Open up the terminal and type the command below<br />
<code>gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy</code></p>
<p>2)﻿Then,find out this line(should be line 34):</p>
<p><strong>&lt;allow_active&gt;auth_admin_keep&lt;/allow_active&gt;</strong></p>
<p>and change that line to</p>
<p><strong>&lt;allow_active&gt;yes&lt;/allow_active&gt;</strong></p>
<p>Save the file and you are done:):)</p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=344">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/02/disable-ask-for-password-when-browsing-windows-partitions-in-file-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AJAX IM – Browser-based instant messaging client</title>
		<link>http://techgyan.im/2010/01/ajax-im-%e2%80%93-browser-based-instant-messaging-client/</link>
		<comments>http://techgyan.im/2010/01/ajax-im-%e2%80%93-browser-based-instant-messaging-client/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 16:32:09 +0000</pubDate>
		<dc:creator>Pradeep Nayak</dc:creator>
				<category><![CDATA[cool]]></category>
		<category><![CDATA[interesting]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[IM]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://techgyan.im/?p=341</guid>
		<description><![CDATA[AJAX IM (“asynchronous JavaScript and xml based instant messenger”) is a browser-based instant messaging client that allow you to creates a real-time chat environment with a browser based interface. you can use it freely on your website projects or web applications.  It uses the XMLHTTP Request object in JavaScript to send and receive commands to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftechgyan.im%2F2010%2F01%2Fajax-im-%25e2%2580%2593-browser-based-instant-messaging-client%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftechgyan.im%2F2010%2F01%2Fajax-im-%25e2%2580%2593-browser-based-instant-messaging-client%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>AJAX IM (“asynchronous JavaScript and xml based instant messenger”) is a browser-based instant messaging client that allow you to creates a real-time chat environment with a browser based interface. you can use it freely on your website projects or web applications.  It uses the XMLHTTP Request object in JavaScript to send and receive commands to and from the server. No refreshing of the page is ever needed for this “web application” to work, as everything is updated in real-time via JavaScript.<img class="alignnone size-medium wp-image-340" title="ajax_im" src="http://techgyan.im/wp-content/uploads/2010/01/ajax_im-300x257.png" alt="" width="300" height="257" /></p>
<p>Ajax IM is <strong>multiplatform, multilingual instant messaging client</strong> and language files can be found in the Ajax IM website.</p>
<p><strong>Requirement:</strong> PHP, MySQL</p>
<p><strong>Website:</strong> <a title="AJAX IM - Browser-based instant messaging client" rel="nofollow" href="http://www.ajaxim.com/" target="_blank">http://www.ajaxim.com/</a></p>
<p><strong>Backend Demo:</strong> <a title="AJAX IM - Browser-based instant messaging client" rel="nofollow" href="http://www.ajaxim.net/" target="_blank">http://www.ajaxim.net/</a></p>
<p><strong>Backend Demo – User-Pass:</strong> User: test – Pass: test</p>
<p><strong>Download:</strong> <a title="AJAX IM - Browser-based instant messaging client" rel="nofollow" href="http://www.ajaxim.com/" target="_blank">http://www.ajaxim.com/</a></p>
<p>This is pure awsomeness!!:)</p>

                            <div id="aspdf">
                                <a href="http://techgyan.im/wp-content/plugins/as-pdf/generate.php?post=341">
                                    <span>Download as PDF</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://techgyan.im/2010/01/ajax-im-%e2%80%93-browser-based-instant-messaging-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
