<?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>Phasenoise &#187; Command Line</title>
	<atom:link href="http://www.phasenoise.co.uk/tag/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phasenoise.co.uk</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 17 Jan 2012 10:18:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Streamripper On Mac OS X</title>
		<link>http://www.phasenoise.co.uk/2010/06/streamripper-on-mac-os-x/</link>
		<comments>http://www.phasenoise.co.uk/2010/06/streamripper-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 04:18:25 +0000</pubDate>
		<dc:creator>Paul Martin</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Streamripper]]></category>

		<guid isPermaLink="false">http://www.phasenoise.co.uk/?p=586</guid>
		<description><![CDATA[I have written about Streamripper before (removed the older post as is was out of date), it&#8217;s an interesting little application that I use now and then. I originally wrote about compiling it back on OS 10.5 Leopard, at that time the current version was a bit busted but in the end I got it [...]]]></description>
			<content:encoded><![CDATA[<p>I have written about Streamripper before (removed the older post as is was out of date), it&#8217;s an interesting little application that I use now and then. I originally wrote about compiling it back on OS 10.5 Leopard, at that time the current version was a bit busted but in the end I got it to work and posted the details here. Times have changed and software changes so I thought I would update the world on my use of Streamripper. After all the messing about I had with the 1.62.x range of Streamripper I had settled on using 1.61.27 with security patches. I used this for quite a while, last year I thought I would checkout the newer versions of Streamripper and found that they had taken the great little tool and added a whole bunch of stuff that had a dependency on the glib2 library, which is massive when you just want a single little tool. I suppose it&#8217;s ok if you are running on a Linux box where you have glib2 installed as it gets used by lots of applications, but on other platforms it&#8217;s just overkill and I can&#8217;t be bothered with it.</p>
<p>With this I mind I got the source code for the last of the standalone versions 1.62.3, it does everything, and doesn&#8217;t have a massive dependency problem like the recent versions. I made a small change to the source, compiled it and life is good again, much easier than compiling for 10.5 and all that bag of hurt of the older versions :)</p>
<p>The reason I have suddenly posted this is I have just re-compiled Streamripper for Snow Leopard using the new Clang and LLVM-GCC compilers. As all of Snow Leopards utils are in x86-64 I did Streamripper as x86-64, a few years back I never thought I&#8217;d be compiling Streamripper as 64-Bit just seems overkill, but why not :)</p>
<p>I won&#8217;t bother with all the building stuff like my last post on the subject as it&#8217;s not that hard really.</p>
<p>Enjoy!</p>
<div class="example">
<h2>Downloads</h2>
<p><a href="http://www.phasenoise.co.uk/public/downloads/StreamRipper1.62.3x86-64.zip">Download</a> (Streamripper 1.62.3 x86-64)<br />
SHA1: 390c33ce08b5a3f9d72f15cc77523fd153ed9379</p>
<p><a href="http://www.phasenoise.co.uk/public/downloads/streamripper-1.62.3-P1-src.zip">Download</a> (Streamripper 1.62.3 Modified Source Code)<br />
SHA1: f4d8d01cc0293dc21e968cb08dc249513fd0e42c</div>
]]></content:encoded>
			<wfw:commentRss>http://www.phasenoise.co.uk/2010/06/streamripper-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make GCC 4.2 The Default Compiler On Mac OS X</title>
		<link>http://www.phasenoise.co.uk/2008/12/make-gcc-42-the-default-compiler-on-mac-osx/</link>
		<comments>http://www.phasenoise.co.uk/2008/12/make-gcc-42-the-default-compiler-on-mac-osx/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 12:50:37 +0000</pubDate>
		<dc:creator>Paul Martin</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.phasenoise.co.uk/?p=341</guid>
		<description><![CDATA[On Mac OS X 10.5 the default compiler is GCC 4.0.1, Apple does provide GCC 4.2.1 as part of the XCode Developer Tools releases for 10.5 but it isn&#8217;t setup as the default. The main tools are located in /usr/bin. In this folder you will find both gcc 4.0 and 4.2 along with g++ 4.0 [...]]]></description>
			<content:encoded><![CDATA[<p>On Mac OS X 10.5 the default compiler is GCC 4.0.1, Apple does provide GCC 4.2.1 as part of the XCode Developer Tools releases for 10.5 but it isn&#8217;t setup as the default.</p>
<p>The main tools are located in <span class="code">/usr/bin</span>. In this folder you will find both gcc 4.0 and 4.2 along with g++ 4.0 and 4.2. The commands gcc, g++, cc, and gcov are all symbolic links to the default 4.0 versions. To make 4.2 the default we just need to modify the symbolic links.</p>
<p>To do this we need to go in to the Terminal and issue the following commands:</p>
<div class="example">
<span class="code">cd /usr/bin<br />
sudo ln -Fs c++-4.2 c++<br />
sudo ln -Fs gcc-4.2 cc<br />
sudo ln -Fs g++-4.2 g++<br />
sudo ln -Fs gcc-4.2 gcc<br />
sudo ln -Fs gcov-4.2 gcov<br />
</span>
</div>
<p>Now you should have a complete working gcc 4.2.1 tool chain. If there is a problem you can verify the symbolic links are pointing at the correct targets by typing <span class="code">ls -l</span> Hope this helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phasenoise.co.uk/2008/12/make-gcc-42-the-default-compiler-on-mac-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safari 3.2.1 High CPU Usage</title>
		<link>http://www.phasenoise.co.uk/2008/12/safari-321-high-cpu-usage/</link>
		<comments>http://www.phasenoise.co.uk/2008/12/safari-321-high-cpu-usage/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 23:28:07 +0000</pubDate>
		<dc:creator>Paul Martin</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.phasenoise.co.uk/?p=321</guid>
		<description><![CDATA[I&#8217;ve been having some rather odd Safari problems today for the first time since I can remember. I really dig Safari, it&#8217;s everything I want in a browser and getting better with each release. I&#8217;ve been using Safari since the public beta back in January 2003 back when Mac OS X 10.2 was the main [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having some rather odd Safari problems today for the first time since I can remember. I really dig Safari, it&#8217;s everything I want in a browser and getting better with each release. I&#8217;ve been using Safari since the public beta back in January 2003 back when Mac OS X 10.2 was the main OS.</p>
<p>Anyway this afternoon I noticed that Safari kept using 100% CPU and becoming un responsive. I kept force quitting it but the problem kept coming back after about 10 mins. I tried the usual repair permissions, delete preferences and caches etc to no avail. I then thought I would try the Safari 4 Developer Preview, I downloaded it and installed it. It was perfectly stable and very fast, can&#8217;t wait for the finial release of that badboy! At this point I was still stumped as to why 3.2.1 was holding the CPU hostage but Safari 4 was fine. I uninstalled Safari 4 and reinstalled 3.2.1.. On restarting everything seemed fine but yet again it took all the CPU, back where I started. Just launching Safari and then closing the window and waiting would cause the CPU to be held hostage again.</p>
<p>I ran a filesystem trace to see what files Safari was touching, I basically sat and waited until the high CPU condition happened then took a look to see what files were accessed. After an hour of watching and timing the problem it seemed that Safari was continuously reading from the filesystem which is what was causing the massive CPU load. It was triggered by an unusual cache file hit, I did a check to see what network connections were established and saw some odd looking google server addresses, it then dawned on me that Safari 3.2 features anti-phishing protection that uses a blacklist provided by google.</p>
<p>This also explained why the the Safari 4 Developer Preview worked correctly as it doesn&#8217;t yet have the anti-phishing stuff. I turned off the anti-phishing stuff in Safari 3.2.1 and sure enough everything went back to normal. Me being me I was still bothered because why would it suddenly cause problems, it&#8217;s been working fine until today. I went back and took a look at the cache files it was using for the blacklists, I thought that corruption of some kind was most likely so I deleted them. I then re-enabled the anti-phishing mode in Safari 3.2.1, now been three hours and all is well again.</p>
<div class="example">
To kill the blacklist cache (which is rebuilt afterwards) first quit Safari then open the Terminal and type the following:</p>
<p><span class="code">sudo rm -r /private/var/folders/*</span>
</div>
<p>Relaunch Safari and all should be well. I couldn&#8217;t find any references to this problem online so I though I would post something.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phasenoise.co.uk/2008/12/safari-321-high-cpu-usage/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Disable Spotlight Indexing On A Certain Drive</title>
		<link>http://www.phasenoise.co.uk/2006/12/disable-spotlight-indexing-on-a-certain-drive/</link>
		<comments>http://www.phasenoise.co.uk/2006/12/disable-spotlight-indexing-on-a-certain-drive/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 17:07:21 +0000</pubDate>
		<dc:creator>Paul Martin</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.phasenoise.co.uk/2006/12/12/disable-spotlight-indexing-on-a-certain-drive/</guid>
		<description><![CDATA[Spotlight is the search system built into Mac OS 10.4 or higher, whenever you make a change to a file spotlight comes along and indexes the metadata of that file. This feature is great it means that you can find stuff really fast. Whenever you attach an external disk to the system Spotlight will index [...]]]></description>
			<content:encoded><![CDATA[<p>Spotlight is the search system built into Mac OS 10.4 or higher, whenever you make a change to a file spotlight comes along and indexes the metadata of that file. This feature is great it means that you can find stuff really fast. Whenever you attach an external disk to the system Spotlight will index the drive also, this can be very annoying if say for example you have a separate partition with another copy of Mac OS X that you don&#8217;t won&#8217;t indexed, or it could be a partition containing your backups.</p>
<p>There is a configuration panel in System Preferences for things to exclude from the Spotlight search but drives don&#8217;t seem to stick. Under the hood of the OS there are some utils that can help here. one is called <span class="code">mdutil</span>. <span class="code">mdutil</span> which I suppose is named metadatautil really lets you turn Spotlight on/off and lets you delete the metadata store so that it could be rebuilt.</p>
<p>To deactivate Spotlight on a certain drive (in my case my firewire drive called &#8220;TinyDrive&#8221;) just enter the terminal and do the following.</p>
<div class="example"> <span class="code">sudo mdutil -i off /Volumes/TinyDrive</span></p>
<p>You can get a list of drives on your system by listing to the Volumes directory.</p>
<p><span class="code">ls -a /Volumes</span></div>
<p>If you want to reactivate Spotlight use the main command above but changing <span class="code">off</span> to <span class="code">on</span></p>
<p>Hope this helps</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phasenoise.co.uk/2006/12/disable-spotlight-indexing-on-a-certain-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading MySQL On Mac OS X</title>
		<link>http://www.phasenoise.co.uk/2006/09/upgrading-mysql-on-mac-os-x/</link>
		<comments>http://www.phasenoise.co.uk/2006/09/upgrading-mysql-on-mac-os-x/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 12:40:34 +0000</pubDate>
		<dc:creator>Paul Martin</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.phasenoise.co.uk/2006/09/04/upgrading-mysql-on-mac-os-x/</guid>
		<description><![CDATA[Thought this might be a useful addition to my other post &#8220;Installing MySQL on Mac OS X&#8221; To start off go and get the latest version of MySQL. Hopefully you have downloaded a nice diskimage (.dmg) this should contain the startup item install package (.pkg) and the MySQL package (.pkg) there is normally also a [...]]]></description>
			<content:encoded><![CDATA[<p>Thought this might be a useful addition to my other post <a href="http://www.phasenoise.co.uk/2006/02/17/installing-mysql-on-mac-os-x/">&#8220;Installing MySQL on Mac OS X&#8221;</a></p>
<p>To start off go and get the latest version of MySQL. Hopefully you have downloaded a nice diskimage (.dmg) this should contain the startup item install package (.pkg) and the MySQL package (.pkg) there is normally also a control panel in the diskimage. I don&#8217;t use the startup item as I like to just turn on MySQL when I want it.</p>
<p>Ok make sure MySQL is off, if you have MySQL installed and the control pannel just go to &#8216;System Preferences&#8217; and click the MySQL icon and hit the &#8216;Stop MySQL button. Ok Install the the MySQL package, this will install MySQL in the directory /usr/local/ . Sorry but this bit need the terminal people so open it up. Do the following :</p>
<div class="example">
<ol>
<li>Goto to where it lives<br />
<span class="code">cd /usr/local</span></li>
<li>Go to the old install so for example on my machine :<br />
<span class="code">cd mysql-standard-5.0.25-osx10.4-powerpc</span></li>
<li>All you will see in here is a directory called &#8220;data&#8221;. Copy this to the new install. (The install package puts a symbolic link in the main dir to the latest MySQL install so this makes life easy.)<br />
<span class="code">cp -r data /usr/local/mysql/</span><br />
if you have problems use<br />
<span class="code">sudo cp -r data /usr/local/mysql/</span><br />
now your new version has all your databases and settings you need to set them up or you will just getting errors when starting MySQL.</li>
<li>Ok navigate the current MySQL install<br />
<span class="code">cd /usr/local/mysql</span><br />
Now we need to set permissions for the data file for it to work. Type the following.<br />
<span class="code">sudo chown -R mysql data/</span><br />
Enter you password and you should be done.</li>
<li>Now you start your new version and test all is well. If all is well you can now trash the old install directory and also the old install package receipt found in /Library/Receipts</li>
</ol>
</div>
<p>I wrote this of the top of my head so let me know if you have a problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phasenoise.co.uk/2006/09/upgrading-mysql-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL On Mac OS X</title>
		<link>http://www.phasenoise.co.uk/2006/02/installing-mysql-on-mac-os-x/</link>
		<comments>http://www.phasenoise.co.uk/2006/02/installing-mysql-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 17 Feb 2006 09:24:36 +0000</pubDate>
		<dc:creator>Paul Martin</dc:creator>
				<category><![CDATA[General Posts]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.phasenoise.co.uk/2006/02/17/installing-mysql-on-mac-os-x/</guid>
		<description><![CDATA[First download the right MySQL installer .pkg from the MySQL site. This should mount as a disk image on the desktop. Double click and install the package, then double click the Mysql.prefpane and it will offer you two choices : Install for all users or install for current user. Select which you want then load [...]]]></description>
			<content:encoded><![CDATA[<p>First download the right MySQL installer .pkg from the MySQL site. This should mount as a disk image on the desktop. Double click and install the package, then double click the Mysql.prefpane and it will offer you two choices : Install for all users or install for current user. Select which you want then load up the terminal.</p>
<p>In the terminal type the following :</p>
<div class="example"><span class="code">cd /usr/local/mysql<br />
sudo chown -R mysql data/<br />
sudo echo<br />
sudo ./bin/mysqld_safe &amp;</span></div>
<p>At this stage you close the terminal window and open a new one and do the following :</p>
<div class="example"><span class="code">/usr/local/mysql/bin/mysql test</span></div>
<p>You should get some thing like &#8220;Welcome to MySQL&#8221; type thing at this point, that means it&#8217;s all fine and working. Type q to quit the montior. Next we need to setup the root password for MySQL by doing the following:</p>
<div class="example"><span class="code">/usr/local/mysql/bin/mysqladmin -u root password <em>thepasswordyouwant</em></span></div>
<p>Thats it you should be done, to control the system and add users check the documentation or you can use things like the MySQL administrator app or phpMyAdmin, there is plenty of bits out there.</p>
<p><em>Tested using Mac OS X 10.4.5 and MySQL 5.0.18</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phasenoise.co.uk/2006/02/installing-mysql-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

