<?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>Linux For All &#187; Command</title>
	<atom:link href="http://www.linux4all.in/category/command/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux4all.in</link>
	<description>Making Linux Usable For All From Newbies To Techies</description>
	<lastBuildDate>Wed, 15 Dec 2010 05:34:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Update Your Linux Box Status to Twitter Using oAuth</title>
		<link>http://www.linux4all.in/2010/08/03/update-your-linux-box-status-to-twitter-using-oauth/</link>
		<comments>http://www.linux4all.in/2010/08/03/update-your-linux-box-status-to-twitter-using-oauth/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 05:48:23 +0000</pubDate>
		<dc:creator>Kunal Gautam</dc:creator>
				<category><![CDATA[Command]]></category>
		<category><![CDATA[Featured Post]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.linux4all.in/?p=172</guid>
		<description><![CDATA[Guide for updating System Uptime to twitter using oAuth and PHP]]></description>
			<content:encoded><![CDATA[<p>Twitter recently announced (<a href="http://dev.twitter.com/announcements">source</a>) that they will be shutting down basic authentication on the Twitter API.  So all applications, need to switch to using Oauth, which means the earlier article on <a href="http://www.linux4all.in/2008/08/20/update-your-linux-box-status-to-twitter/"><strong>Update Your Linux Box Status to Twitter</strong></a> will not work for the readers.</p>
<p>This article aims to fill up the gap by implementing oAuth using PHP .  So before starting, lets check the perquisites for proper working of this article .</p>
<p style="text-align: center;"><a href="http://www.linux4all.in/wp-content/uploads/2010/08/Twitter-Linux.jpg"><img class="aligncenter size-full wp-image-182" title="Twitter-Linux" src="http://www.linux4all.in/wp-content/uploads/2010/08/Twitter-Linux.jpg" alt="Twitter Linux" width="520" height="175" /></a></p>
<p><strong>System Perquisites:</strong></p>
<pre>A Linux Box

PHP5 with php-curl ( php5-curl ) installed

A working Internet Connection</pre>
<p>The first step involve in having a oAuth Twitter app is to register your application with twitter.</p>
<p>Steps for Registering Twitter Application :</p>
<ol>
<li>Visit <a href="http://dev.twitter.com">http://dev.twitter.com</a></li>
<li>Click on Register Your App Link</li>
<li>Fill the Form with App Name, 	Description, Website link ( if you dont have any link put your 	profile link instead ), Organization</li>
<li>Select Application Type: “Client”</li>
<li>Select Default Access type: “Read 	&amp; Write”</li>
<li>Read/listen captcha and click on 	register application</li>
<li>Accept the Terms and Conditions of 	Twitter API usage</li>
</ol>
<p>Next step involve extracting information regarding your application which will be needed by PHP script. Here are steps for extracting information :</p>
<ol>
<li>visit <a href="http://dev.twitter.com/apps">http://dev.twitter.com/apps</a></li>
<li>Select your application</li>
<li>Copy/Note Down the following 	informationa) Consumer keyb) Consumer secret</li>
<li>Now click on “My Access Token” 	link</li>
<li>Copy/Note Down the following 	informationa) Access Token (oauth_token)b) Access Token Secret 	(oauth_token_secret)</li>
</ol>
<p>Now users need to download the oAuth PHP library ( We have used @<a href="http://twitter.com/abraham">abraham&#8217;s</a> Twitter OAuth library for PHP )</p>
<p>Download @<a href="http://twitter.com/abraham">abraham&#8217;s</a> Twitter OAuth library for PHP from <a href="http://github.com/abraham/twitteroauth">here</a></p>
<p>Extract twitteroauth/ directory to a specified folder</p>
<p>now create a tweet.php file with following code, in the specified folder</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="kw2">&lt;?php</span>
&nbsp;
<span class="kw1">require_once</span><span class="br0">&#40;</span><span class="st_h">'twitteroauth/twitteroauth.php'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="re0">$ckey</span> <span class="sy0">=</span> <span class="st0">&quot;Place_Your_Consumer_key_here&quot;</span><span class="sy0">;</span>
<span class="re0">$csecret</span> <span class="sy0">=</span> <span class="st0">&quot;Place_Your_Consumer_Secret_here&quot;</span><span class="sy0">;</span>
&nbsp;
<span class="re0">$oauthtoken</span> <span class="sy0">=</span> <span class="st0">&quot;Place_Your_oauth_token_here&quot;</span><span class="sy0">;</span>
<span class="re0">$oauthtokensecret</span> <span class="sy0">=</span> <span class="st0">&quot;Place_Your_oauth_token_Secret_here &quot;</span><span class="sy0">;</span>
&nbsp;
<span class="re0">$message</span> <span class="sy0">=</span> <a href="http://www.php.net/exec"><span class="kw3">exec</span></a><span class="br0">&#40;</span><span class="st_h">'uptime'</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">//Command to be executed</span>
&nbsp;
<span class="re0">$connection</span> <span class="sy0">=</span> <span class="kw2">new</span> TwitterOAuth <span class="br0">&#40;</span><span class="re0">$ckey</span> <span class="sy0">,</span><span class="re0">$csecret</span> <span class="sy0">,</span> $ oauthtoken <span class="sy0">,</span> $ oauthtokensecret <span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="re0">$connection</span><span class="sy0">-&gt;</span><span class="me1">post</span><span class="br0">&#40;</span><span class="st_h">'statuses/update'</span><span class="sy0">,</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st_h">'status'</span> <span class="sy0">=&gt;</span> <span class="re0">$message</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="sy1">?&gt;</span></pre></div></div>
<p>Replace the variables above and save the file</p>
<p>Now test the script by passing following command</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux4all.in/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">php /path/to/script/tweet.php</pre></div></div>
<p>If everything is running fine, then users can copy paste the command in cronjob. After this, the machine will tweet its uptime regularly <img src='http://www.linux4all.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Please let me know if you are facing any problem with this script by leaving your comment(s)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux4all.in/2010/08/03/update-your-linux-box-status-to-twitter-using-oauth/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Enabling Write support for all users in SUSE 11</title>
		<link>http://www.linux4all.in/2008/09/12/enabling-write-support-for-all-users-in-suse-11/</link>
		<comments>http://www.linux4all.in/2008/09/12/enabling-write-support-for-all-users-in-suse-11/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 18:35:36 +0000</pubDate>
		<dc:creator>Kunal Gautam</dc:creator>
				<category><![CDATA[Command]]></category>
		<category><![CDATA[Featured Post]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[novell]]></category>
		<category><![CDATA[ntfs]]></category>
		<category><![CDATA[ntfs-3g]]></category>
		<category><![CDATA[suse]]></category>

		<guid isPermaLink="false">http://linux.tech-nologic.info/?p=29</guid>
		<description><![CDATA[By Default non root user don't have full access to the NTFS partition. In this tutorial you will get how to enable full read and write permission to a general or non root user.]]></description>
			<content:encoded><![CDATA[<p>Open SusE 11 is really nice linux distro ,made available by novell .It got many feature by default at the time of installation itself !!. One of this great feature is NTFS drive support.<br />
Although root user has the full access [ i.e. Read Write and Executable ] permission by default. But other users don&#8217;t . In this tutorial I will tell you how to enable Full access to other users too.<span id="more-29"></span></p>
<p>Prequisites :</p>
<p>1)know how to edit files<br />
2)Root Permission</p>
<p>First logged in with root account [ either via console or via graphics ]<br />
NOTE : USER CAN USE SUDO COMMAND ALSO</p>
<p>Then edit the /etc/fstab file<br />
edit the following in the file<br />
/dev/disk/by-id/scsi-URDEVICE_ID /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0</p>
<p>to following fmask and dmask<br />
fmask=000,dmask=000</p>
<p>so that it should look like this<br />
/dev/disk/by-id/scsi-URDEVICE_ID /windows/C ntfs-3g users,gid=users,fmask=000,dmask=000,locale=en_US.UTF-8 0 0</p>
<p>now unmount the volume and mount it again<br />
#umount /windows/C/<br />
and remount by<br />
#mount -a</p>
<p>and the drive will be mounted with full access</p>
<p>If you have any problem please you are free to contact me [ comment here for it <img src='http://www.linux4all.in/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ]</p>
<blockquote><p>Note:- I shud not be held responsible if you cause any data loss [ though nothing happen with me still its nice to write warning <img src='http://www.linux4all.in/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.linux4all.in/2008/09/12/enabling-write-support-for-all-users-in-suse-11/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Basic Command &#8211; II</title>
		<link>http://www.linux4all.in/2008/05/17/basic-command-ii/</link>
		<comments>http://www.linux4all.in/2008/05/17/basic-command-ii/#comments</comments>
		<pubDate>Sat, 17 May 2008 16:55:39 +0000</pubDate>
		<dc:creator>Kunal Gautam</dc:creator>
				<category><![CDATA[Command]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://linux.tech-nologic.info/?p=7</guid>
		<description><![CDATA[Part II of Basic Command . We splited this to make easy readability for our Users :)]]></description>
			<content:encoded><![CDATA[<p><strong>cd</strong> :- change directory</p>
<p>usage<br />
<strong>cd path</strong> [ and press enter ]<br />
eg.<br />
<strong>cd /boot<br />
cd /var/www/html</strong></p>
<p><span id="more-7"></span></p>
<p>to go to base directory use<br />
<strong>cd ..</strong></p>
<p><strong>ifconfig</strong> :- To check network detail of your network adaptors [ same as ipconfig in windows ]</p>
<p><strong>history</strong> :- Will tell your last run command[s]</p>
<p>To clear your history use following command<br />
<strong>history –c</strong></p>
<p>And last but not least use manual<br />
There are various manual program installed on your Linux distro [ cannot guarantee that each command will work fine ]<br />
<strong>man</strong> :- Manual of a command<br />
<strong>man command</strong> [ replace <em>command</em> with your <em>command</em> press enter ]<br />
eg.<br />
<strong>man history</strong></p>
<p><strong>info</strong> :- same as man<br />
<strong>info command</strong> [ replace <em>command</em> with your <em>command</em> press enter ]</p>
<p><strong>whatis</strong> :- Brief description of command<br />
eg.<br />
<strong>whatis command</strong> [ replace <em>command</em> with your <em>command</em> press enter ]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux4all.in/2008/05/17/basic-command-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic Commands</title>
		<link>http://www.linux4all.in/2008/05/06/basic-commands/</link>
		<comments>http://www.linux4all.in/2008/05/06/basic-commands/#comments</comments>
		<pubDate>Tue, 06 May 2008 15:31:33 +0000</pubDate>
		<dc:creator>Kunal Gautam</dc:creator>
				<category><![CDATA[Command]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://linux.tech-nologic.info/?p=6</guid>
		<description><![CDATA[This post aims at basic Linux Commands that is usefull in our day to day life
]]></description>
			<content:encoded><![CDATA[<p>As we are now aware of file system now its good to learn about basic Linux Commands that will help in our day to day life<br />
To run all these commands please use a terminal window.<br />
To run terminal follow following commands<br />
Press <strong>Alt+F2 </strong><br />
Type <strong>gnome-terminal </strong>or use <strong>xterm</strong></p>
<p><span id="more-6"></span><br />
OR<br />
Click on application &#8211;&gt; accessories &#8211;&gt;Terminal or it may be on Application &#8211;&gt; System Tools &#8211;&gt; Terminal<br />
This will open terminal in GUI mode<br />
<strong>Commands with description</strong><br />
<strong>ls</strong><br />
This is command same as dir command in Windows/Dos.</p>
<p>Usages<br />
<strong>ls –ll </strong>This will show Full details about file regarding its permission,owner name,Group,date modified/accessed, etc</p>
<p><strong>ls –a</strong> Shows all files included hidden file [ dotfile ]</p>
<p><strong>ls-s</strong> Shows size</p>
<p>while we do <strong>ls –ll</strong> command the following color is used to identify file/folder as</p>
<p>Dark Blue :-Folder<br />
Black/White:- File<br />
Green:- Executables [ execute permissions]<br />
Sky Blue:- Services<br />
Red Color:- RPM,Installer</p>
<p>Note:- Please note that Linux Files and Folders are case sensitive i.e a &amp; A is different not like windows.</p>
<p><strong>date</strong><br />
As the command indicates it displays time and date of the system</p>
<p><strong>cal</strong><br />
Displays calendar of current month</p>
<p>To view calendar for whole year<br />
<strong>cal 2008</strong><br />
Replace 2008 with your specified year</p>
<p>To view Calendar of particular month of year<br />
<strong>cal 12 1987</strong><br />
Displays calendar of December 1987,[replace with your variables]</p>
<p><strong>hostname</strong><br />
Displays Hostname of the system</p>
<p><strong>cp</strong> :- Copy filename or Directory</p>
<p><strong>Usages</strong><br />
<strong>cp filename destination_folder</strong></p>
<p><strong>cp /yourfolder/filename destination_folder</strong></p>
<p><strong>mv :- </strong>move or rename file/folder</p>
<p><strong>Usage</strong><br />
<strong><em>For moving</em></strong><br />
<strong>mv filename/foldername destination</strong><br />
<em><strong>For renaming</strong></em><br />
<strong>mv file/folder newname</strong></p>
<p><strong><strong><strong>mkdir </strong>:- Create directory<br />
<strong>Usage</strong><br />
<strong>mkdir foldername</strong></strong></strong></p>
<p><strong><strong><strong>rm</strong> :- Removes File/Folders<br />
<strong>Usage</strong><br />
<strong>rm filename/foldername</strong><br />
To remove file/folder forcibly without any prompt<br />
<strong>rm –f foldername/filename</strong></strong></strong></p>
<p><strong><strong>To prompt on each removal of file and folder use this command<br />
<strong>rm –r folder/filename</strong></strong></strong></p>
<p>So we covered<strong><strong> <strong>ls,date,cal,hostname,cp,mv,rm</strong><br />
</strong></strong> More commands in next post</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux4all.in/2008/05/06/basic-commands/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
