<?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>Rasila Garage &#187; mac</title>
	<atom:link href="http://rasilagarage.com/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://rasilagarage.com</link>
	<description>Tuomas Rasila's blog about software and entrepreneurship</description>
	<lastBuildDate>Mon, 30 Aug 2010 00:48:22 +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>Five Cool OS X Terminal Tricks</title>
		<link>http://rasilagarage.com/2010/03/five-cool-os-x-terminal-tricks/</link>
		<comments>http://rasilagarage.com/2010/03/five-cool-os-x-terminal-tricks/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 05:08:09 +0000</pubDate>
		<dc:creator>Tuomas Rasila</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://rasilagarage.com/?p=229</guid>
		<description><![CDATA[We all love Unix shell. I can&#8217;t remember when was the last time I had my Mac running without an open Terminal window. Here are couple of tricks you can do with it. 1. &#8220;cd -&#8221; After finding this in all of its simplicity I asked many of Linux &#38; OS X hardcore users and [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_232" class="wp-caption alignright" style="width: 310px"><a rel="attachment wp-att-232" href="http://rasilagarage.com/2010/03/five-cool-os-x-terminal-tricks/3793035220_3ce2874114/"><img class="size-medium wp-image-232 " title="3793035220_3ce2874114" src="http://rasilagarage.com/wp-content/uploads/2010/03/3793035220_3ce2874114-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Photo courtesy of Mads Sabroe</p></div>
<p>We all love Unix shell. I can&#8217;t remember when was the last time I had my Mac running without an open Terminal window. Here are couple of tricks you can do with it.</p>
<p><strong>1. &#8220;cd -&#8221;</strong><br />
After finding this in all of its simplicity I asked many of Linux &amp; OS X hardcore users and none of them knew this existed. &#8220;cd -&#8221; sends you back to the last directory you where in:</p>
<pre class="brush:bash">
macbookpro:/ tuomas$cd usr/bin/
macbookpro:bin tuomas$ cd -
/
macbookpro:/ tuomas$ cd -
/usr/bin
</pre>
<p><strong>2. &#8220;mkdir -p&#8221;</strong><br />
With mkdir you can make a directory, but adding the &#8220;-p&#8221; argument can make multiple directories in case those do not exist before. For example:</p>
<pre class="brush:bash">
mkdir -p /home/bill/documents/books/computer
</pre>
<p><strong>3. Update Twitter from shell with cURL</strong></p>
<pre class="brush:bash">
curl -u username:password -d status="Your tweet" http://twitter.com/statuses/update.xml
</pre>
<p><strong>4. Speak a text file to spoken .aiff file</strong></p>
<pre class="brush:bash">
cat foo.txt |say -o foo
</pre>
<p> Now try this with Apache log;)</p>
<p><strong>5. &#8220;history&#8221;</strong><br />
History shows you list of commands you have ran before like this:</p>
<pre class="brush:bash">
526  cat blog-google-api.txt |say -o foo.mp3
527  open .
528  ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
529  history
</pre>
<p>If you want to run something from your history you can just: !527 and it will run command #527 from the history. In this case: &#8220;open .&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://rasilagarage.com/2010/03/five-cool-os-x-terminal-tricks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
