<?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>Es Tea Double Eye &#187; Linux</title>
	<atom:link href="http://stii.co.za/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://stii.co.za</link>
	<description>You&#039;re never too old for a happy childhood</description>
	<lastBuildDate>Fri, 19 Aug 2011 02:20:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel='hub' href='http://stii.co.za/?pushpress=hub'/>
		<item>
		<title>Why *nix guys hate Windows</title>
		<link>http://stii.co.za/linux/why-nix-guys-hate-windows/</link>
		<comments>http://stii.co.za/linux/why-nix-guys-hate-windows/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 17:57:22 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://stii.co.za/linux/why-nix-guys-hate-windows/</guid>
		<description><![CDATA[On my way to work this morning I had to stop at my friend&#8217;s place and pick up his two beautiful Labradors&#8217; piles of crap since I got home too late last night to take my son to do it. Not an ideal start to a day. When I got to work, the morning took [...]]]></description>
			<content:encoded><![CDATA[<p>On my way to work this morning I had to stop at my friend&#8217;s place and pick up his two beautiful Labradors&#8217; piles of crap since I got home too late last night to take my son to do it. Not an ideal start to a day. When I got to work, the morning took a turn for the worst when I had to help someone with a strange error on a Windows machine. </p>
<p>The poor bloke came to me for help. When he opens MS Word, a message saying &#8220;Insufficient memory or disk space. Cannot open font&#8221; graced the screen. How arb&#8230; After mucking about for 30 minutes just trying to find my way in Windows again (it&#8217;s been a significant while) I ended up taking somebody&#8217;s advice and inserted the Office install CD and run a repair. </p>
<p>Low and behold it worked! How very clever of me to listen to someone else&#8217;s advice. Job well done. The world is right again, or is it? </p>
<p>I had this very unsatisfying, empty feeling of total unaccomplishment. That, my dear friends, are why Linux/Unix folk hate Windows. </p>
<p>It is quite a feeling of achievement fixing a Linux issue. Hacking your way around until you&#8217;ve sorted it out. It takes a certain level of skill and require you to think and apply yourself to a problem which is very satisfying once you solved the problem. Any fool can insert a CD and select the repair option, reboot after repairing and Voila! the world is round again.</p>
<p>Now I just know that Windows pundits will harp on about how easy it was to fix the problem. Sure. I&#8217;ll admit it, it was so easy a monkey on a typewriter could fix it with his feet. My problem is that I have no idea what caused the problem in the first place. If it happens again will inserting the CD work? What if it doesn&#8217;t work next time? It&#8217;s a simple case of I started out with nothing and still got most of it left.</p>
<p>I can go on and on and on. Bottom line is that we hate Windows not so much because it sucks, but because it leaves us feeling empty and dumb while we should feel smart. Then again, it could possibly be that I simply had a shitty start to the day&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/linux/why-nix-guys-hate-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Red Hat Europe still powered by PHP4</title>
		<link>http://stii.co.za/php/red-hat-europe-still-powered-by-php4/</link>
		<comments>http://stii.co.za/php/red-hat-europe-still-powered-by-php4/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:44:26 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php4]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[redhat europe]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=1008</guid>
		<description><![CDATA[I find this very hard to believe, but it seems that Red Hat Europe&#8216;s site is still powered by PHP 4. PHP 4.3.2 to top it all off. This after PHP 4 reached it&#8217;s end of life more than a year ago. I guess the old saying applies: If it&#8217;s not broken, don&#8217;t fix it! [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://stii.co.za/wp-content/uploads/2009/10/redhat-logo-400x128.jpg" alt="redhat-logo" title="redhat-logo" width="400" height="128" class="alignnone size-medium wp-image-1010" /></p>
<p>I find this very hard to believe, but it seems that <a href="http://www.europe.redhat.com/">Red Hat Europe</a>&#8216;s site is still powered by PHP 4. <strong>PHP 4.3.2</strong> to top it all off. This after PHP 4 reached it&#8217;s end of life more than a year ago. I guess the old saying applies:</p>
<blockquote><p>If it&#8217;s not broken, don&#8217;t fix it!</p></blockquote>
<p>Right&#8230;? It is just a little bizarre, I guess. Here is a screenshot of the headers.</p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/10/Screen-shot-2009-10-15-at-11.00.01-PM.png" alt="Redhat PHP4 headers" title="Redhat PHP4 headers" width="283" height="116" class="alignnone size-full wp-image-1009" /></p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/php/red-hat-europe-still-powered-by-php4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome OS hype</title>
		<link>http://stii.co.za/open-source/google-chrome-os-hype/</link>
		<comments>http://stii.co.za/open-source/google-chrome-os-hype/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 11:06:52 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google-chrome]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[operating system]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=785</guid>
		<description><![CDATA[Google announced today their new Google Chrome OS. As they put it: &#8220;It’s our attempt to re-think what operating systems should be,&#8221; and &#8220;However, the operating systems that browsers run on were designed in an era where there was no web.&#8221; If one thinks about it, it makes a lot of sense what Google is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://stii.co.za/wp-content/uploads/2009/07/googlechromelogo.png" alt="googlechromelogo" title="googlechromelogo" width="196" height="187" class="alignright size-full wp-image-786" />Google announced today their new <strong><a href="http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html" rel="nofollow">Google Chrome OS</a></strong>. As they put it:</p>
<blockquote><p>
&#8220;It’s our attempt to re-think what operating systems should be,&#8221;<br />
and<br />
&#8220;However, the operating systems that browsers run on were designed in an era where there was no web.&#8221;
</p></blockquote>
<p>If one thinks about it, it makes a lot of sense what Google is trying to do. It would (should?) be a far less complex system. The apps you&#8217;re used to use will live online and will be rendered and displayed using HTML5. It can be done. It is, IMHO, a good idea. Yes, connectivity and bandwidth issues plays a big role, but we all know thats the two things that is growing and not declining. I can see the potential and the practicality of it. I&#8217;m not convinced that it would be adopted on Enterprise level, but it would be something that could work for me and what I would use it for.</p>
<p>There are two things that bothers me:</p>
<p><strong>1. <a href="http://www.techcrunch.com/2009/07/07/google-drops-a-nuclear-bomb-on-microsoft-and-its-made-of-chrome/" rel="nofollow">Google Drops A Nuclear Bomb On Microsoft. And It’s Made of Chrome</a>. &#8211; Techcrunch</strong><br />
Why would this be seen as a Nuclear Bomb on Microsoft? C&#8217;mon Techcrunch, thats a bit sensational wouldn&#8217;t you agree? It would be YEARS before big corporates and Windows users would ditch their Microsoft investments for Chrome OS, so I do not think they are sweating yet. In fact, they have more than enough time to build a competitive product IF they are clever. I&#8217;m not so sure they are as clever as they are arrogant. Be a bit more realistic and less sensational, please!</p>
<p><strong>2. Why is Google riding this Open Source wave with so much enthusiasm?</strong><br />
Don&#8217;t get me wrong, I think it is absolutely fabulous, I&#8217;m just wondering &#8220;why&#8221;? Surely they have or at least can get the best of the best, no? So why make such a big deal about it? I&#8217;m not sure. I guess I should be thanking Google instead of questioning their motives, right? If they are so passionate about OSS then why not release everything? Why not Gmail, Google Search, Adsense/Adwords, Google Docs, etc? Maybe I&#8217;m just not thinking this strategy of theirs through properly. Maybe they simply don&#8217;t pay enough to rope in and retain the <a href="http://sfbay.craigslist.org/sfc/eng/1246353621.html">badass ninja coders</a>. I cannot really say with conviction, but would love to know.</p>
<p>Kudos to <a href="http://andreinafrica.com">André van Rooyen</a> who saw this coming when the <a href="http://stii.co.za/software/google-chrome-for-mac-and-linux/">Chrome browser</a> was released when I did not. I&#8217;m starting to see the light and catch his drift.</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/open-source/google-chrome-os-hype/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Blasphemy! There is some seriously wrong with this picture&#8230;</title>
		<link>http://stii.co.za/funnies/blasphemy-there-is-some-seriously-wrong-with-this-picture/</link>
		<comments>http://stii.co.za/funnies/blasphemy-there-is-some-seriously-wrong-with-this-picture/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 07:22:36 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Funnies]]></category>
		<category><![CDATA[blasphemy]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tux]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=579</guid>
		<description><![CDATA[Can you spot the blasphemy in this image below? I&#8217;m thinking of starting an email petition. Old skool style! ;) Lets hear it.]]></description>
			<content:encoded><![CDATA[<p>Can you spot the blasphemy in this image below? I&#8217;m thinking of starting an email petition. Old skool style! ;)</p>
<p><img src="http://stii.co.za/wp-content/uploads/2009/04/n509484421_1636956_829867-400x371.jpg" alt="n509484421_1636956_829867" title="n509484421_1636956_829867" width="400" height="371" class="aligncenter size-medium wp-image-580" /></p>
<p>Lets hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/funnies/blasphemy-there-is-some-seriously-wrong-with-this-picture/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>5 simple Bash tips</title>
		<link>http://stii.co.za/linux/5-simple-bash-tips/</link>
		<comments>http://stii.co.za/linux/5-simple-bash-tips/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 08:31:59 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux-commands]]></category>
		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=540</guid>
		<description><![CDATA[If you work in the command line on Bash a lot you&#8217;ll probably find that you often repeat commands. Often you need to run similar commands, but change something like a path, for example. Below are 5 very basic and simple things you should get into the habit of using as they just might make [...]]]></description>
			<content:encoded><![CDATA[<p>If you work in the command line on <a href="http://stii.co.za/tag/bash/">Bash</a> a lot you&#8217;ll probably find that you often repeat commands. Often you need to run similar commands, but change something like a path, for example. Below are 5 very basic and simple things you should get into the habit of using as they just might make your life simpler. They work wonders for me :)</p>
<p><strong>1. Search the command history:</strong></p>
<pre>
$ ctrl+r
(reverse-i-search)`ls': ls - l /opt/local/var/db/mysql5
</pre>
<p>This is by far the handiest tip. On the command line, press the Control button and R. This will activate a reverse interactive search. start typing something that was in the command and it will return the last command with the text in it. If it is not this particular command you were looking for, press <strong>Control+R</strong> again and it will return the next command. Keep hitting Control+R until you find the command you were looking for and hit enter to run the command. It beats retyping commands or pressing the up arrow until you get the command. :)</p>
<p><strong>2. Edit the previous command</strong></p>
<pre>
$ fc
</pre>
<p>Running the <strong>fc</strong> command opens your default system editor (<strong>VIM</strong> in most cases) and allow you to edit the command. After your changes when you exit VIM your edited command will execute. This is handy if you were running a complex long command but made a mistake and need to edit some things somewhere in the middle of the complex command. Handy if you remember you can do that. </p>
<p><strong>3. Run the last command of a certain type</strong></p>
<pre>
$ !ssh
ssh -l stii stii.co.za
</pre>
<p>If you&#8217;ve ran a bunch of commands and cannot remember exactly when last you ran a certain command, but you know you want to run the last ssh command, use the <strong>!ssh</strong> to run the last ssh command you&#8217;ve executed. This will save you time again on paging up through your history to find that command.</p>
<p><strong>4. Run the last command of a certain type, replacing some values</strong></p>
<pre>
$ !ssh:s/stii.co.za/afrigator.com
ssh -l stii afrigator.com
</pre>
<p>Same as the previous command except it will replace the domain name stii.co.za with the domain afrigator.com. Very, very handy one for running repetitive commands with different arguments. It sure as hell beats finding the command, backspacing the argument you want to change and typing in the correct value!</p>
<p><strong>5. Swop two characters quickly</strong></p>
<p>If you have twiddle fingers or cronic dyslexia like some of us, then this one&#8217;s a gem. ;) Lets say you typed a command and swapped two characters around:</p>
<pre>
$ cd /home/afrigtaor
</pre>
<p>Instead on moving your cursor to the a, backspacing twice and retyping the a and t in the correct order, all you need to do is to move your cursor to the a and press <strong>Control+t</strong> and it will swop the t and the a around fixing your typo. Although this one is a bit of a useless one, if you do swap characters often, it might be handy to know of this trick ;)</p>
<p>These tips are very basic and would probably not be news for most experienced <strong>Bash</strong> aficionados. I find these very handy and use them often on a daily basis, so maybe it could be handy to someone else. If you have a set of your own favorite tricks, please do let me know as I love learning and improving! <strong><em>Happy Bashing!</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/linux/5-simple-bash-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An age old debate laid to rest. How to pronounce Linux</title>
		<link>http://stii.co.za/linux/an-age-old-debate-laid-to-rest-how-to-pronounce-linux/</link>
		<comments>http://stii.co.za/linux/an-age-old-debate-laid-to-rest-how-to-pronounce-linux/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 08:19:02 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linus torvalds]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=294</guid>
		<description><![CDATA[Found this little gem over on dmiessler.com. I could not agree more with his statement: When an authority for a particular product or movement explicitly states how that thing is pronounced, that pronunciation does in fact become the correct one. So in case you are still say Linux in every imaginable way except the right [...]]]></description>
			<content:encoded><![CDATA[<p>Found this little gem over on <a href="http://dmiessler.com/blog/theres-only-one-way-to-pronounce-linux-video">dmiessler.com</a>. I could not agree more with his statement:</p>
<blockquote><p>When an authority for a particular product or movement explicitly states how that thing is pronounced, that pronunciation does in fact become the correct one.</p></blockquote>
<p>So in case you are still say <strong>Linux</strong> in every imaginable way except the right way, here is the definitive answer. Here is the right and only way to <strong>pronounce Linux</strong> as dictated by the legend <strong>Linus Torvalds</strong> himself:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/5IfHm6R5le0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/5IfHm6R5le0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>As Daniel says:</p>
<h3>End of debate.</h3>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/linux/an-age-old-debate-laid-to-rest-how-to-pronounce-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bash script or command to get a process id</title>
		<link>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/</link>
		<comments>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 05:00:38 +0000</pubDate>
		<dc:creator>Stii</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux-commands]]></category>
		<category><![CDATA[shell-scripts]]></category>

		<guid isPermaLink="false">http://stii.co.za/?p=269</guid>
		<description><![CDATA[Bash (a.k.a. Bourne Again SHell) is one of the best tools you&#8217;ll ever come across on Linux, Unix or OSX. You can do virtually anything with it! It is said that bash even cures cancer! Now, let me make this very, very clear&#8230; I&#8217;m not an expert. I haven&#8217;t written much bash scripts for the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://stii.co.za/wp-content/uploads/2009/01/gnu-head-sm.jpg" alt="bash logo" title="bash logo" width="129" height="122" class="alignright size-full wp-image-271" /><strong>Bash</strong> (a.k.a. <strong>B</strong>ourne <strong>A</strong>gain <strong>SH</strong>ell) is one of the best <strong>tools</strong> you&#8217;ll ever come across on <strong>Linux, Unix or OSX</strong>. You can do virtually anything with it! It is said that <a href="http://bashcurescancer.com/">bash even cures cancer</a>! Now, let me make this very, very clear&#8230; I&#8217;m not an <a href="http://singe.za.net/blog/archives/967-WorkTime-Script-to-Prevent-Innapropriate-Web-Surfing.html">expert</a>. I haven&#8217;t written much <strong>bash scripts</strong> for the past 5 years, so it would be fair to say I&#8217;m a <strong>n00b</strong>. At the very least, I&#8217;m not a <em>l33t bash afiçionado</em>.</p>
<p>I had a specific need. I needed a way to find out if a <strong>process</strong> was running and to obtain its <strong>process id (pid)</strong>. Well, in all honesty, I didn&#8217;t REALLY needed the <strong>pid</strong>, but thought it could maybe be handy for some, so I included it anyway. In my case, all I wanted to know was whether a process was running and if not, to start it. I digress. </p>
<p>First what I needed was to find the <strong>process</strong> I&#8217;m looking for:</p>
<pre>
#!/bin/bash

pid=`ps -eo pid,args | grep myprocess | \
grep -v grep | cut -c1-6`
#do what I need with the pid
</pre>
<p>What we did here:</p>
<p>First we get the process with the <strong>ps command</strong>. the <strong>-e</strong> option tells it to find processes in the entire environment. Without <strong>-e</strong> it will return only the processes owned by the user who runs the command. The <strong>-o</strong> option lets you specify which <strong>fields</strong> you want. That is exactly what the <strong>pid,args</strong> are. It is the fields we want, and the only fields we want in this instance.</p>
<p>Next we pipe the <strong>ps command</strong> through the <strong>grep command</strong>. <strong>grep</strong> extracts all the lines the <strong>ps command</strong> return that contains the string you specify, in this case &#8220;myprocess&#8221;.</p>
<p>Since the <strong>grep command</strong> will also return the <strong>grep process</strong>, we need to pipe it to another grep command to remove the grep proccess itself. The <strong>-v</strong> option tells grep to do an invert match, i.o.w. exclude the line containing the word &#8220;grep&#8221;. Lets look at an example:</p>
<p>If we only use:</p>
<pre>
$ ps -eo pid,args | grep myprocess
1234    /path/to/myprocess.sh
34761  grep myprocess
</pre>
<p>It returns two lines. We&#8217;re not interested in the second line and need to exclude it so the command:</p>
<pre>
$ ps -eo pid,args | grep myprocess | grep -v grep
1234   /path/to/myprocess.sh
</pre>
<p><strong>grep -v grep</strong> excludes the line that contains &#8220;grep&#8221;. Nifty. Just what we need.</p>
<p>The next step is to get the pid (process id) piping the results to the <strong>cut command</strong>. The <strong>-c1-6</strong> simply says &#8220;cut the characters from the first character up to and including the 6th character&#8221;.</p>
<pre>
... cut -c1-6
</pre>
<p>There you have it! You can now do what you need to with that process id. Crush it, Kill it, Destroy it, whatever tickles your fancy!</p>
<p>I&#8217;d like to know from the <strong>real experts</strong>, what would be an easier way to do it?  More important, what would be a better way to do it? I have to be honest, I didn&#8217;t really <strong>googled</strong> much for an answer since I was busy doing the <a href="http://afrigator.com">Afrigator</a> language files and was looking for anything to procrastinate on and this seemed like great fun! My solution might not be very good. For example, it does not allow for more than one process. It assumes that there would always only be one process running. It should be easy enough to allow for more than one process, but I&#8217;ll leave that up to you! You would need to split the lines&#8230; argh, just figure it out!</p>
<p>PS: <a href="http://justinhartman.com">Justin</a> &#038; <a href="http://lesterhein.blogspot.com">Lester</a>, next time you give me grief, I will replace the two of you with <strong>bash scripts</strong>!</p>
<h3>Update:</h3>
<p>Here is a simpler command by <a href="http://www.ddj.co.za/">Donald Jackson</a> via Twitter utilizing <strong>awk</strong>: </p>
<pre>
$ ps aux | grep processname | grep -v grep | awk '{print $2}'
</pre>
<p>Thanx <a href="http://twitter.com/donaldza">@donaldza</a></p>
]]></content:encoded>
			<wfw:commentRss>http://stii.co.za/linux/bash-script-or-command-to-get-a-process-id/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

