<?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>leftcolumn.net &#187; mac</title>
	<atom:link href="http://www.leftcolumn.net/tags/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leftcolumn.net</link>
	<description>Covering Mac OS X, Mac Software, and other stuff</description>
	<lastBuildDate>Tue, 11 May 2010 12:51:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Two Nifty Terminal History Tricks</title>
		<link>http://www.leftcolumn.net/2010/05/12/nifty-terminal-history-trick/</link>
		<comments>http://www.leftcolumn.net/2010/05/12/nifty-terminal-history-trick/#comments</comments>
		<pubDate>Tue, 11 May 2010 12:39:51 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[mac osx]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.leftcolumn.net/?p=226</guid>
		<description><![CDATA[I&#8217;ve covered the &#8216;history&#8217; command before, but here are two more useful Mac OS X Terminal commands&#8230;
I&#8217;ve been using the Ctrl+ R trick (Hit Ctrl + R, start typing part of the command you want. If you don&#8217;t like the first suggestion hit Ctrl + R again to show the next one). This is really [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;ve covered the <a href="http://www.leftcolumn.net/2009/02/15/40-useful-mac-os-x-shell-scripts-and-terminal-commands/">&#8216;history&#8217; command</a> before, but here are two more useful Mac OS X Terminal commands&#8230;</strong></p>
<p>I&#8217;ve been using the Ctrl+ R trick (Hit Ctrl + R, start typing part of the command you want. If you don&#8217;t like the first suggestion hit Ctrl + R again to show the next one). This is really handy and fast and it will return matches from the middle of the string.</p>
<p>And I just found another great Terminal command here: <a href="http://osxdaily.com/2010/05/10/discover-the-last-used-command-beginning-with-anything-without-executing-it/">Discover the last used command beginning with anything without executing it</a>&#8230; this one is a bit harder to use:</p>
<p><code>![needle]:p</code></p>
<p>&#8230;where [needle] is the first character(s) of the command you&#8217;re looking for. It&#8217;s not as flexible because it only shows the most recent match instead of cycling through the results, but could still come in handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leftcolumn.net/2010/05/12/nifty-terminal-history-trick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>40 Useful Mac OS X Shell Scripts and Terminal Commands</title>
		<link>http://www.leftcolumn.net/2009/02/15/40-useful-mac-os-x-shell-scripts-and-terminal-commands/</link>
		<comments>http://www.leftcolumn.net/2009/02/15/40-useful-mac-os-x-shell-scripts-and-terminal-commands/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 10:51:16 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[mac osx]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.leftcolumn.net/?p=71</guid>
		<description><![CDATA[Here are a bunch of Mac OS X terminal commands sorted into general categories. I have intentionally omitted long bash scripts and AppleScripts and focussed instead on small useful commands that can be plugged into bigger scripts or used on their own&#8230; enjoy!
System
Restart Mac OS X:
shutdown - r now
Shutdown Mac OS X:
shutdown now
Power Management / [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a bunch of Mac OS X terminal commands sorted into general categories. I have intentionally omitted long bash scripts and AppleScripts and focussed instead on small useful commands that can be plugged into bigger scripts or used on their own&#8230; enjoy!</p>
<h3>System</h3>
<p>Restart Mac OS X:</p>
<pre>shutdown - r now</pre>
<p>Shutdown Mac OS X:</p>
<pre>shutdown now</pre>
<h3>Power Management / Energy Saving</h3>
<p>Get overview of current Power Management Settings:</p>
<pre>pmset -g</pre>
<p>Put display to sleep after 15 minutes of inactivity:</p>
<pre>sudo pmset displaysleep 15</pre>
<p>Put Computer to sleep after 30 minutes of inactivity:</p>
<pre>sudo pmset sleep 30</pre>
<p>&#8230;Also see my post about <a href="http://www.leftcolumn.net/2009/05/24/macbook-pro-wont-wake-up-from-sleep/" title="hibernate mode and Safe Sleep on the Mac">hibernate mode and Safe Sleep on the Mac</a></p>
<h3>OS X Look and Feel</h3>
<p><a href="http://www.macosxhints.com/article.php?story=20090105064613347">Permanently disable Dock icon bouncing</a></p>
<p>Disable Dashboard (don&#8217;t forget to drag the Dashboard Dock icon off the Dock too):</p>
<pre>defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock</pre>
<p>Enable Dashboard:</p>
<pre>defaults write com.apple.dashboard mcx-disabled -boolean NO
killall Dock</pre>
<p>Force the Finder to show hidden files (very useful for Web Developers who need to edit .htaccess files, for example):</p>
<pre>defaults write com.apple.finder AppleShowAllFiles TRUE</pre>
<p>Force the Finder to hide hidden files (ie: back to the default setting):</p>
<pre>defaults write com.apple.finder AppleShowAllFiles FALSE</pre>
<h3>Networking</h3>
<p>Ping a host to see whether it&#8217;s available:</p>
<pre>ping -o leftcolumn.net</pre>
<p>Troubleshoot routing problems to a host using traceroute:</p>
<pre>traceroute leftcolumn.net</pre>
<p>Check whether a host is running an HTTP server (ie: check that a Web Site is available):</p>
<pre>curl -I www.leftcolumn.net | head -n 1</pre>
<p><a href="http://www.macosxhints.com/article.php?story=20080217065538984">Automatically enable Internet Sharing at startup</a></p>
<p>Manage Windows networks (a drop-in for the NET command on Windows). Too many options to list here, so run this for details:</p>
<pre>man net</pre>
<p>Use dig to discover Domain information:</p>
<pre>dig www.leftcolumn.net A
dig www.leftcolumn.net MX</pre>
<p>Who is logged in to your Mac?</p>
<pre>w</pre>
<p>Show routing table:</p>
<pre>netstat -r</pre>
<p>Show active network connections:</p>
<pre>netstat -an</pre>
<p>Show network statistics:</p>
<pre>netstat -s</pre>
<h3>Troubleshooting</h3>
<p>List all open files (this will take a few seconds to complete on most Macs):</p>
<pre>lsof</pre>
<p>Restart Bonjour &#8211; handy when a Mac &#8216;disappears&#8217; from the Network:</p>
<pre>sudo launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist</pre>
<p>Eject a CD&#8230; it&#8217;s never happened to me but you can eject a stuck cd with the following. Note that it won&#8217;t always be &#8216;disk1&#8242;:</p>
<pre>diskutil eject disk1</pre>
<h3>Text Manipulation commands</h3>
<p><em>Sometimes you need to take some text from the clipboard or a file, transform it somehow and then use it. Here are a bunch of commands that do text manipulation. I&#8217;ve assumed you want to transform text from the clipboard and back again, see the notes at the end of the article for info on how to write to and from files instead.</em></p>
<p>Count number of lines in the text in the Clipboard:</p>
<pre>pbpaste | wc -l</pre>
<p>Count number of words in the text in the Clipboard:</p>
<pre>pbpaste | wc -w</pre>
<p>Sort lines of text in the Clipboard and copy them back to the Clipboard:</p>
<pre>pbpaste | sort | pbcopy</pre>
<p>Reverse each line of text in the Clipboard (ie: make each line appear backwards) and copy them back to the Clipboard:</p>
<pre>pbpaste | rev | pbcopy</pre>
<p>Strip duplicate lines from lines of text in the Clipboard and copy only one instance of each duplicate line back to the Clipboard (output is sorted):</p>
<pre>pbpaste | sort | uniq | pbcopy</pre>
<p>Find duplicate lines from lines of text in the Clipboard and copy only one instance of each duplicate line (stripping non-duplicates) back to the Clipboard (output is sorted):</p>
<pre>pbpaste | sort | uniq -d | pbcopy</pre>
<p>Strip duplicate lines from lines of text in the Clipboard and copy only one instance of each line (stripping duplicates entirely) back to the Clipboard (output is sorted):</p>
<pre>pbpaste | sort | uniq -u | pbcopy</pre>
<p>Tidy up HTML in the Clipboard and copy it back to the Clipboard:</p>
<pre>pbpaste | tidy | pbcopy</pre>
<p>Display the first 5 lines from the Clipboard:</p>
<pre>pbpaste | head -n 5</pre>
<p>Display the last 5 lines from the Clipboard:</p>
<pre>pbpaste | tail -n 5</pre>
<p>Convert tabs to spaces for the lines in the Clipboard:</p>
<pre>pbpaste | expand | pbcopy</pre>
<h3>Other useful commands</h3>
<p>Password protect your web site! Create a CRYPTed user/password for using in a .htpasswd file. Save the <strong>outputted results</strong> of <strong>A</strong> below to a file called .htpasswd in the directory you want to secure. Then save the <strong>contents</strong> of <strong>B</strong> to a file called .htaccess in the same folder.</p>
<h4>A:</h4>
<pre>htpasswd -nb username password</pre>
<h4>B:</h4>
<pre>AuthType Basic
AuthName "restricted area"
AuthUserFile /path/to/your/site/.htpasswd
require valid-user</pre>
<p>Display a history of commands used in the terminal by the current user:</p>
<pre>history</pre>
<p>Convert a file to HTML. Support formats are Text, .RTF, .DOC.</p>
<pre>textutil -convert html file.extension</pre>
<p>Nano is a very easy-to-use text editor for quick changes to text files. It is less powerful than VIM but has the advantage of clearly showing you the common editing commands:</p>
<pre>nano [file_to_edit]</pre>
<p>&#8230;In nano, use ctrl+o to Save and ctrl+x to quit.</p>
<h3>iTunes</h3>
<p>Change iTunes link behaviour to point at local iTunes Library instead of iTunes Store:</p>
<pre>defaults write com.apple.iTunes invertStoreLinks -bool YES</pre>
<p>Change iTunes link behaviour to point at iTunes Store instead of local iTunes Library (ie: back to the default):</p>
<pre>defaults write com.apple.iTunes invertStoreLinks -bool NO</pre>
<h3>Other Mac OS X Terminal Resources</h3>
<p><a href="http://www.kernelthread.com/mac/osx/tools.html">Mac OS X Hacking Tools</a> (old but detailed list for the obsessive only).</p>
<p><a href="http://hayne.net/MacDev/Bash/">Cameron Hayne&#8217;s Bash Scripts</a></p>
<p><a href="http://www.macosxhints.com/">Mac OS X Hints</a></p>
<p><a href="http://discussions.apple.com/">Apple Forums</a></p>
<p>Note: For commands where I&#8217;ve used pbcopy to get the contents of the Clipboard as input, you can use the contents of a file as input instead. Swap <em>pbpaste</em> for:</p>
<pre>cat [/path/to/filename]</pre>
<p>And to put the results into a file on your desktop, just swap <em>| pbcopy</em> for:</p>
<pre>&gt; ~/Desktop/filename.txt</pre>
<p>&#8230; hope you find them useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leftcolumn.net/2009/02/15/40-useful-mac-os-x-shell-scripts-and-terminal-commands/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Essential Web Development Software: DigitalColor Meter</title>
		<link>http://www.leftcolumn.net/2009/01/26/essential-web-development-software/</link>
		<comments>http://www.leftcolumn.net/2009/01/26/essential-web-development-software/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 09:37:24 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[digitalcolor meter]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.leftcolumn.net/?p=48</guid>
		<description><![CDATA[Â 
Installed with every Mac, DigitalColor Meter gives you accurate readings of on-screen colours: you can inspect individual pixels, and copy and paste RGB values. When used with Safari or Firefox and a great text editor, it&#8217;s a lightweight but powerful tool. Here&#8217;s an overview&#8230;
Â 

Find it in /Applications/Utilities/
For using with HTML and CSS, Â set the colour [...]]]></description>
			<content:encoded><![CDATA[<p>Â </p>
<div id="attachment_49" class="wp-caption alignleft" style="width: 236px"><img class="size-full wp-image-49  " title="DigitalColor Meter in use" src="http://www.leftcolumn.net/wp-content/uploads/2009/01/picture-3.png" alt="DigitalColor Meter is handy for sampling on-screen colour " width="226" height="113" /><p class="wp-caption-text">DigitalColor Meter is handy for sampling on-screen colour </p></div>
<p><em><strong>Installed with every Mac, DigitalColor Meter gives you accurate readings of on-screen colours: you can inspect individual pixels, and copy and paste RGB values. When used with Safari or Firefox and a great text editor, it&#8217;s a lightweight but powerful tool. Here&#8217;s an overview&#8230;</strong></em></p>
<p>Â </p>
<ul>
<li>Find it in /Applications/Utilities/</li>
<li>For using with HTML and CSS, Â set the colour type to &#8220;RGB as Hex Value, 8-bit&#8221;</li>
<li>Command+Shift+c to copy the current colour as text &#8211; perfect for pasting straight into a .css file, alternatively, click and drag from the swatch area to copy the current colour as text (switch this on in preferences first)</li>
<li>Command+Shift+h to hold the current colour</li>
<li>Set the magnification factor to maximum and the aperture size to minimum for pixel-perfect sampling. Handy for &#8216;borrowing&#8217; font colours from other sites!</li>
<li>Reduce the magnification factor and increase the aperture size for getting an averaged colour &#8211; say, when you&#8217;re working with gradients or photos</li>
<li>When DigitalColor Meter is the active app, you can use the arrow keys to move the aperture in one-pixel increments</li>
<li>You can also save the current hovered area as a .tiff file, or copy it to the clipboard.Â </li>
<li>Set the window to float and keep it in the bottom right of the screen, so it&#8217;s always there at a glance.Â </li>
</ul>
<p>One last point: on Tiger at least, if you switch users to a user who hasÂ DigitalColor MeterÂ running it will crash. But that&#8217;s an annoyance at worst&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leftcolumn.net/2009/01/26/essential-web-development-software/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Retrospect again</title>
		<link>http://www.leftcolumn.net/2007/10/31/retrospect-again/</link>
		<comments>http://www.leftcolumn.net/2007/10/31/retrospect-again/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 10:42:10 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[retrospect]]></category>

		<guid isPermaLink="false">http://www.leftcolumn.net/2007/10/31/retrospect-again/</guid>
		<description><![CDATA[UPDATE 24 March 2009: Retrospect 8 for Mac OS X has been released! 
Just saw this on MacNN: EMC Retrospect 8.0 on chopping block? (ok, it&#8217;s months old), so it looks like version 8 definitely isn&#8217;t coming to the Mac. Is it just me or does this seem like an opportunity for some hungry Mac [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 24 March 2009</strong>: <a href="http://www.retrospect.com/products/software/retroformac/" title="Retrospect 8 for Mac OS X" >Retrospect 8 for Mac OS X has been released!</a> </p>
<p>Just saw this on MacNN: <a title="EMC Retrospect 8.0 on chopping block?" href="http://www.macnn.com/articles/07/01/22/emc.axes.retrospect.80/" target="_blank">EMC Retrospect 8.0 on chopping block?</a> (ok, it&#8217;s months old), so it looks like version 8 definitely isn&#8217;t coming to the Mac. Is it just me or does this seem like an opportunity for some hungry Mac developers to build a really good backup system that suits Small Office Networks, has provision for offsite backups like Retrospect does, but sports a swish Cocoa interface and is Universal?</p>
<p>Because basically Time Machine covers local backups but doesn&#8217;t serve the same &#8216;Backup Server&#8217; role that Retrospect Workgroup does&#8230;</p>
<p>I know there are some good small backup apps for the Mac out there, but do any backup a network of Macs and provide backup set management?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leftcolumn.net/2007/10/31/retrospect-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leopard will probably kill Retrospect</title>
		<link>http://www.leftcolumn.net/2007/10/20/leopard-will-probably-kill-retrospect/</link>
		<comments>http://www.leftcolumn.net/2007/10/20/leopard-will-probably-kill-retrospect/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 08:16:37 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.leftcolumn.net/2007/10/20/leopard-will-probably-kill-retrospect/</guid>
		<description><![CDATA[UPDATE 24 March 2009: Retrospect 8 for Mac OS X has been released. So, given the limitations of Leopard&#8217;s Time Machine, it might be worth a look&#8230; 
&#8230;At least in our office. With the imminent arrival of Leopard, my attention&#8217;s turned to the upgrade process. At the moment, the only application that I can foresee [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 24 March 2009</strong>: <a href="http://www.retrospect.com/products/software/retroformac/" title="Retrospect 8 for Mac OS X" >Retrospect 8 for Mac OS X has been released</a>. So, given the limitations of Leopard&#8217;s Time Machine, it might be worth a look&#8230; </p>
<p>&#8230;At least in our office. With the imminent arrival of Leopard, my attention&#8217;s turned to the upgrade process. At the moment, the only application that I can foresee having problems is Retrospect. No real reason for that, other than it&#8217;s not Universal and is generally old and clunky! But Time Machine might take care of most of our backup needs pretty simply, so I&#8217;m considering just ditching Retrospect. The only snag is that we do offsite backups with Retrospect &#8211; every week I retrieve one drive and send the other.</p>
<p>So how to replicate the offsite part of the backup system? If Time Machine supports multiple drives and therefore Multiple backups, it would be simple. Perhaps an online system, e.g.: .Mac or S4? Is Apple doing this to drive more customers to .Mac?</p>
<p>I&#8217;m in two minds about the departure of Retrospect, it really is flexible and it has done a great job, but the interface is arcane and non-Intel native (and with no upgrade in sight!). It also requires a bit of administration overhead, so I&#8217;m angling to reduce that and go for a more Mac-like backup experience &#8211; <strong>it should just work</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leftcolumn.net/2007/10/20/leopard-will-probably-kill-retrospect/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
