<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2453526944291778837</atom:id><lastBuildDate>Mon, 28 Nov 2011 01:04:49 +0000</lastBuildDate><category>scripting series</category><category>Linux Distros</category><category>Social</category><category>Linux 101</category><category>Tips</category><category>Backup</category><category>Linux howTo</category><title>LINUX for neophyte</title><description>Linux Tricks | Tutorial | Commands | News | Technology | Programming | More</description><link>http://linuxforneophyte.blogspot.com/</link><managingEditor>noreply@blogger.com (Lemuel)</managingEditor><generator>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/LinuxForNeopyhte" /><feedburner:info uri="linuxforneopyhte" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-1213226732996145669</guid><pubDate>Thu, 28 Jan 2010 13:22:00 +0000</pubDate><atom:updated>2010-01-28T05:27:56.418-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Backup</category><title>Backup online data using Backupify</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pk4IfQKnJ7o/S2GPSL2WYVI/AAAAAAAAABY/N1qhh0J8OcY/s1600-h/Backupify.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pk4IfQKnJ7o/S2GPSL2WYVI/AAAAAAAAABY/N1qhh0J8OcY/s320/Backupify.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;It's time for you to backup all of your online sites, like facebook, flickr, google docs and other sites that you store online. You'll never know when something happens on these sites. And good thing that &lt;a href="http://www.backupify.com/"&gt;Backupify&lt;/a&gt; is doing this kind of service. They are offering a free account sign-up until January 31, 2010.&lt;br /&gt;
Backupify is very easy to use, after sign-up you can configure the sites you want to backup. It's using Amazon webservices, so I think and believe that it's a good quality.&lt;br /&gt;
&lt;br /&gt;
Here are the supported sites:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt; Google Docs&lt;/li&gt;
&lt;li&gt;Twitter&lt;/li&gt;
&lt;li&gt;Flickr&lt;/li&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;Basecamp&lt;/li&gt;
&lt;li&gt;Wordpress&lt;/li&gt;
&lt;li&gt;Delicious&lt;/li&gt;
&lt;li&gt;Photobucket&lt;/li&gt;
&lt;li&gt;Blogger&lt;/li&gt;
&lt;li&gt;Friendfeed&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;It will alert you through email when backup is finished. I have tried it and started to like it. With the advent of technology, rule of the thumb is you need to have three backup location, your computer/laptop, your on-line sites and your on-line backup.&lt;br /&gt;
&lt;br /&gt;
Act now and act fast. Backup! Backup! Backup!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-1213226732996145669?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/oj3NIAHhUyA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/oj3NIAHhUyA/backup-online-data-using-backupify.html</link><author>noreply@blogger.com (Lemuel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_pk4IfQKnJ7o/S2GPSL2WYVI/AAAAAAAAABY/N1qhh0J8OcY/s72-c/Backupify.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2010/01/backup-online-data-using-backupify.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-312901489622480322</guid><pubDate>Fri, 08 Jan 2010 14:54:00 +0000</pubDate><atom:updated>2010-01-08T06:54:11.589-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Linux howTo</category><title>Linux howTo: How to check your Computer's temperature</title><description>There are times that you want to check your computer's temperature or server. You can check it with a simple command:&lt;br /&gt;
&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b style="color: blue;"&gt;&amp;nbsp;&amp;nbsp; user@linux$ &lt;span style="color: #990000;"&gt;cat /proc/acpi/thermal_zone/THRM/temparature&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: blue; text-align: left;"&gt;&lt;b&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp; temperature:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 C&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: blue; text-align: left;"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; user@linux$&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;Note that this method works only if &lt;a href="http://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface"&gt;ACPI&lt;/a&gt; (Advanced Configuration and Power Interface) thermal zones are supported on your computer. &lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-312901489622480322?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/A2r1jSuiSdo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/A2r1jSuiSdo/linux-howto-how-to-check-your-computers.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2010/01/linux-howto-how-to-check-your-computers.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-3481364266834407703</guid><pubDate>Wed, 06 Jan 2010 13:52:00 +0000</pubDate><atom:updated>2010-01-06T05:52:38.934-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips</category><title>Linux Tip: Linux monitor processes using kill</title><description>&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;One of the tasks of an Administrators or even users of Linux server, workstations and desktop is to monitor running processes. Processes that are important to your production Linux servers. One of the command that I recently learn that can help in monitoring linux processes is the &lt;b&gt;&lt;span style="color: #cc0000;"&gt;kill -0&lt;/span&gt;&lt;/b&gt; command. But wait, kill means terminate the process. How can we monitor the process if we use the kill command?&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;When you refer to the manual/info of kill, 0 means no signal will be sent, it will not terminate the process. By combining return status(&lt;b style="color: #cc0000;"&gt;echo $?&lt;/b&gt;) with &lt;b style="color: #cc0000;"&gt;kill -0&lt;/b&gt;, you can check if a certain process is running or not.&lt;br /&gt;
&lt;br /&gt;
Open a gnome-terminal and login as root or use sudo for Ubuntu user.&lt;br /&gt;
All processes running (UNIX daemon) are at &lt;b&gt;&lt;i&gt;&lt;span style="color: #990000;"&gt;/var/run&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; directory. So when you want to check the process id(pid) of yum daemon, just look into the file /var/run/yum.pid.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #cc0000;"&gt; &lt;span style="color: blue;"&gt;root@linux# &lt;span style="color: #cc0000;"&gt;cat /var/run/yum.pid&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #cc0000;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;1755&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Do the following command when checking the status of process:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;root@linux# &lt;span style="color: #cc0000;"&gt;kill -0 1755&lt;/span&gt;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux# &lt;span style="color: #cc0000;"&gt;echo $?&lt;/span&gt;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #cc0000;"&gt; 0&lt;/span&gt;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the output of echo $? is 0, that means the process is running. Refer to my other post regarding $? variable &lt;a href="http://linuxforneophyte.blogspot.com/2009/12/linux-question-command-or-script-exit.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
To shorten the above procedure, we can just do this:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;root@linux# kill -0 $(cat /var/run/yum.pid)&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux# echo $?&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux#&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Daemon is not running ( yums.pid doesn't exist )&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;root@linux# kill -0 $(cat /var/run/yums.pid)&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #cc0000;"&gt;cat: /var/run/yums.pid: No such file or directory&lt;/span&gt;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux# echo $?&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #cc0000;"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@linux#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can now monitor processes with &lt;span style="color: #cc0000;"&gt;kill -0&lt;/span&gt; command. Just play around, it will help in some unexpected situations.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-3481364266834407703?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/E96UwiugUqw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/E96UwiugUqw/linux-tip-linux-monitor-processes-using.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2010/01/linux-tip-linux-monitor-processes-using.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-1369296652598107099</guid><pubDate>Sat, 26 Dec 2009 14:41:00 +0000</pubDate><atom:updated>2009-12-26T06:41:24.851-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Social</category><title>Pidgin, chat client for Linux</title><description>&lt;div style="text-align: left;"&gt;If you are looking for a good chat client for Linux, I suggest you use the &lt;a href="http://www.pidgin.im/"&gt;Pidgin&lt;/a&gt;. It's user friendly and easy to use.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;Pidgin is a chat client account for Windows, Linux and other UNIX operating system.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;It let's you manage an accounts on multiple chat network. Compatible with the following chat networks:AIM, ICQ, Google Talk, Jabber/XMPP, MSN Messenger, Yahoo!, Bonjour, Gadu-Gadu, IRC, Novell GroupWise Messenger, QQ, Lotus Sametime, SILC, SIMPLE, MySpaceIM, and Zephyr. It can support many more with plugins.&lt;br /&gt;
&lt;br /&gt;
There are two easy ways to install it( do this as root ) using a Fedora Core 11:&lt;br /&gt;
&lt;br /&gt;
1.&lt;b&gt;Through yum command&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;root@penguin$ &lt;b&gt;&lt;span style="color: #660000;"&gt;yum install pidgin&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;It will get all the necessary package and dependencies for pidgin.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;If you are using Fedora Core 4, 5, 6 or 7 follow this &lt;a href="http://www.pidgin.im/download/fedora_core/"&gt;steps&lt;/a&gt; from pidgin site&lt;br /&gt;
&lt;br /&gt;
2. &lt;b&gt;Through Add/Remove Software GUI&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Go to &lt;b&gt;&lt;span style="color: #660000;"&gt;System-&amp;gt;Add/Remove Software&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Enter 'pidgin' in the find entry form, press find. It will show a lists related to your keyword search. Find the Pidgin, select it and press apply button. It will install and download all the dependencies&lt;br /&gt;
&lt;br /&gt;
After installing it. Pidgin will appear at &lt;b&gt;&lt;span style="color: #990000;"&gt;Applications-&amp;gt;Internet-&amp;gt;Pidgin&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;You can now start to add your accounts and enjoy...&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;For Ubuntu users you can follow this link from pidgin &lt;a href="http://pidgin.im/download/ubuntu/"&gt;http://pidgin.im/download/ubuntu/&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;Feel free to drop a comments...&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: left;"&gt;source : &lt;a href="http://pidgin.im/"&gt;pidgin.im&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-1369296652598107099?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/e4FLlqDb39s" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/e4FLlqDb39s/pidgin-chat-client-for-linux.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2009/12/pidgin-chat-client-for-linux.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-9119648201891039365</guid><pubDate>Thu, 24 Dec 2009 08:03:00 +0000</pubDate><atom:updated>2009-12-24T00:03:54.486-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Linux Distros</category><title>Linux distros: available Linux distros</title><description>Question : What are the different popular Linux distributions?&lt;br /&gt;
&lt;br /&gt;
Answer :&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b style="color: #660000;"&gt;Fedora&lt;/b&gt; - developed by community-supported Fedora Project and sponsored by Red Hat.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b style="color: #660000;"&gt;Ubuntu&lt;/b&gt; - sponsored by UK based company Canonical Ltd. It is based on Debian/Linux distribution system.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Linux Mint&lt;/span&gt;&lt;/b&gt; - based on Ubuntu with integrated media codecs. Founded by Clement Lefebvre&lt;/li&gt;
&lt;li&gt;&lt;b style="color: #660000;"&gt;CentOS&lt;/b&gt; - community supported based on Red Hat Enterprise Linux&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Debian&lt;/span&gt;&lt;/b&gt; - a GNU/Linux based distro&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Gentoo&lt;/span&gt;&lt;/b&gt; - based on either Linux or FreeBSD that can be automatically optimized and customized for just about any application.&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;You can try them and differentiate their capability. For beginners, use the Ubuntu and Linux Mint, they have a good desktop user experience.&lt;br /&gt;
&lt;br /&gt;
source : &lt;a href="http://wikipedia.com/"&gt;wikipedia.com&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-9119648201891039365?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/403Kfu7imeM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/403Kfu7imeM/linux-distros-available-linux-distros.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2009/12/linux-distros-available-linux-distros.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-3482019997222334052</guid><pubDate>Sun, 20 Dec 2009 09:51:00 +0000</pubDate><atom:updated>2009-12-20T06:04:01.197-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Linux howTo</category><title>Linux howTo: How to see Linux Unix command manual?</title><description>Question: How to see Linux / Unix command manual?&lt;br /&gt;
&lt;br /&gt;
Answer:&lt;br /&gt;
Linux / Unix commands have built-in manuals. Just do the following command&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #990000;"&gt;user@penguin$ man top&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
man is a built in command for Linux. man will check if there is top document, if it has it will load the on-line manual pages in the command line.&lt;br /&gt;
&lt;br /&gt;
This is the result of the above command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;top(1) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;NAME&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; top - display and update sorted information about processes&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;SYNOPSIS&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; top &amp;nbsp; &amp;nbsp;[-a | -d | -e | -c &lt;mode&gt;]&lt;/mode&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-F | -f]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-h]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-i &lt;interval&gt;]&lt;/interval&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-k]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-L | -l &lt;samples&gt;]&lt;/samples&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-o &lt;key&gt;] [-O &lt;skey&gt;]&lt;/skey&gt;&lt;/key&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-p &lt;format&gt;] [-P ]&lt;/format&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-R | -r]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-S]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-s &lt;delay&gt;]&lt;/delay&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-T | -t]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-U &lt;user&gt;]&lt;/user&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-u]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-W | -w]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[-X | -x]&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[[-n] &lt;nprocs&gt;]&lt;/nprocs&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feel free to add a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-3482019997222334052?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/HeGfnLbIz20" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/HeGfnLbIz20/linux-howto-how-to-see-linux-unix.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2009/12/linux-howto-how-to-see-linux-unix.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-7717036634816635434</guid><pubDate>Fri, 18 Dec 2009 11:50:00 +0000</pubDate><atom:updated>2009-12-19T07:08:08.954-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Linux 101</category><title>Linux question: command or script exit status</title><description>&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Question: What is exit status of shell or command in Linux?&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Answer:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Every time a process or shell exit, it will send a terminating code to the operating system. This is what they call &lt;b&gt;&lt;span style="color: red;"&gt;'exit status'&lt;/span&gt;&lt;/b&gt;. We can detect wether the command is successful or not by checking the exit status. Here's how you can check:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;user@penguin$ echo "Hello World"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Hello World&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;user@penguin$ &lt;/span&gt;&lt;/i&gt;&lt;span style="color: red;"&gt;&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;echo $?&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;0&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;user@penguin$&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;$?&lt;/span&gt;&lt;/b&gt; is a variable where Linux stores the exit status of the previous command it ran.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;0 in exit code is successful. If greater than 0, it means that it was exited abnormally or there's an error.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;user@penguin$ ech "Hello World"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;-bash: ech: command not found&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;user@penguin$ &lt;/span&gt;&lt;/i&gt;&lt;span style="color: red;"&gt;&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;echo $?&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;127&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;user@penguin$&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;ech is not a linux command. And the exit code is greater than 0 because of the error.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Try to play with it. This will be a great help for your linux knowledge.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Feel free to post a comment.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-7717036634816635434?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/dQtFQ_O8Uwc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/dQtFQ_O8Uwc/linux-question-command-or-script-exit.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2009/12/linux-question-command-or-script-exit.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2453526944291778837.post-3168885318464694632</guid><pubDate>Wed, 16 Dec 2009 14:28:00 +0000</pubDate><atom:updated>2009-12-17T07:00:48.336-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">scripting series</category><category domain="http://www.blogger.com/atom/ns#">Linux howTo</category><title>Linux howTo: shell sccripting part 1</title><description>&lt;div  style="text-align: left; font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;In this post we will walk through the different parts of shell scripting. It is intended for beginners and those folks who want a refresher. We will use any text editor you like ('vi' is also ok).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div  style="text-align: left; font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Difficulty: &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div  style="text-align: left; font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;So let's start. Open your favorite editor. Copy and paste the following code block(red font).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;div  style="text-align: left; font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;      #! /bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;    # my first script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;    echo "Hello World"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(204, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;    exit 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;Save it as scriptpart1.sh, we use the .sh file extension so that we know that this file is a shell script. After saving the file. We need to make the file executable.&lt;br /&gt;At the command line type the following and press enter&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;     user@penguin$ chmod 755 scriptpart1.sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;You can now execute the script.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;span style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;     user@penguin$ ./scriptpart1.sh&lt;br /&gt;   Hello World&lt;br /&gt;  user@penguin$&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;You should see the &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Hello World&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; at the command line after you press enter.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Let's start understanding every line of the script&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(204, 0, 0); font-style: italic; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;    #! /bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Is the entry point of the script. #! is also known as shebang while /bin/sh is the interpreter. It will use the /bin/sh environment.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;/bin/sh is known as Bourne shell.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;/bin/csh is known as C shell.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;/bin/bash is known as Bourne-again shell.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;There are lots of unix shell but our main focus is the Bourne shell.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;How to know the complete path of the interpreter we are using?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Answer: At the command line type 'which sh' and press enter&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;    user@penguin$ which sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;    /bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;   user@penguin$&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;In this machine that I'm using, the sh path is at /bin/sh. We can now move on to the next line which is:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;    # my first script&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;This line is a comment one. You can actually put some notes in the script. Note that #! is not a comment. Comment is very useful, you can put anywhere in your code. Standard practice is to put a short and precise comment.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Next part is the blank line. Shell script will ignore the blank line and it will go to the next line. Next line is the echo line.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;    echo "Hello World"&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;echo in Linux means displaying the word in the command line. That's why we have 'Hello World' displayed after we ran the script.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;We are almost done. You can now display messages using the echo command.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Last part is the exit.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;    exit 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;It will exit the script. And the number 0, it will tell to the Linux current process that the script exited at 0, meaning successful. We will elaborate next time regarding the exit code of commands and script.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;So that's how we write a script. Till next time. Feel free to comment on this post.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2453526944291778837-3168885318464694632?l=linuxforneophyte.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/LinuxForNeopyhte/~4/QiQ7dpwvho8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/LinuxForNeopyhte/~3/QiQ7dpwvho8/linux-howto-shell-sccripting-part-1.html</link><author>noreply@blogger.com (Lemuel)</author><thr:total>0</thr:total><feedburner:origLink>http://linuxforneophyte.blogspot.com/2009/12/linux-howto-shell-sccripting-part-1.html</feedburner:origLink></item></channel></rss>

