<?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>david winter &#187; command line</title>
	<atom:link href="http://davidwinter.me.uk/articles/tag/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidwinter.me.uk</link>
	<description>you were expecting someone else?</description>
	<lastBuildDate>Mon, 28 Jun 2010 20:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Switch to Static IP on Ubuntu Server</title>
		<link>http://davidwinter.me.uk/articles/2007/01/27/switch-to-static-ip-on-ubuntu-server/</link>
		<comments>http://davidwinter.me.uk/articles/2007/01/27/switch-to-static-ip-on-ubuntu-server/#comments</comments>
		<pubDate>Sat, 27 Jan 2007 12:25:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2007/01/27/switch-to-static-ip-on-ubuntu-server/</guid>
		<description><![CDATA[I just bought a new Linksys router for my home network and wanted to set-up my Ubuntu Web Server with a static IP address so that I could port-forward a few things. Trouble is, with only the command line it&#8217;s a little tricky to figure out exactly how to do it. Following are the steps [...]]]></description>
			<content:encoded><![CDATA[<p>I just bought a new Linksys router for my home network and wanted to set-up my Ubuntu Web Server with a static IP address so that I could port-forward a few things. Trouble is, with only the command line it&#8217;s a little tricky to figure out exactly how to do it. Following are the steps I used.</p>

<pre><code>sudo nano /etc/network/interfaces
</code></pre>

<p>Inside the file, you&#8217;ll see the following line:</p>

<pre><code>iface eth1 inet dhcp
</code></pre>

<p>We want to switch from <code>dhcp</code> to a <code>static</code> IP address. Comment or delete that line, and then add the following to the file:</p>

<pre><code>iface eth1 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
</code></pre>

<ol>
<li>This line states we want to use a static IP address.</li>
<li>The static IP address you want to use.</li>
<li>The subnet mask.</li>
<li>This is the IP address of my router which connects to the Internet.</li>
</ol>

<p>Save the file and then restart the network settings:</p>

<pre><code>sudo /etc/init.d/networking restart
</code></pre>

<p>Job done.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2007/01/27/switch-to-static-ip-on-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Unix Disk Usage</title>
		<link>http://davidwinter.me.uk/articles/2007/01/21/unix-disk-usage/</link>
		<comments>http://davidwinter.me.uk/articles/2007/01/21/unix-disk-usage/#comments</comments>
		<pubDate>Sun, 21 Jan 2007 12:28:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[dapper]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2007/01/21/unix-disk-usage/</guid>
		<description><![CDATA[A very handy command to see the total size of a directory on a Unix-based computer. du -sh * This will show the total size of files and directories in your current working directory. The s flag means to show a summary&#8211;which basically just shows the top level directory only, instead of the contents of [...]]]></description>
			<content:encoded><![CDATA[<p>A very handy command to see the total size of a directory on a Unix-based computer.</p>

<pre><code>du -sh *
</code></pre>

<p>This will show the total size of files and directories in your current working directory. The <code>s</code> flag means to show a summary&#8211;which basically just shows the top level directory only, instead of the contents of each and every folder down the file system hierarchy. The <code>h</code> flag shows a human readable file size.</p>

<p>For my home directory, I get the following output:</p>

<pre><code>404M    Desktop
 30G    Documents
6.0G    Library
 32G    Movies
 18G    Music
 11G    Pictures
2.7G    Projects
 16K    Public
166M    Sites
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2007/01/21/unix-disk-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change your Terminal prompt &#8211; Lost style</title>
		<link>http://davidwinter.me.uk/articles/2006/12/06/change-your-terminal-prompt-lost-style/</link>
		<comments>http://davidwinter.me.uk/articles/2006/12/06/change-your-terminal-prompt-lost-style/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 15:09:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[lost]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2006/12/06/change-your-terminal-prompt-lost-style/</guid>
		<description><![CDATA[Fancy a change from the default prompt you get in your Terminal? Want to mimic the Terminal prompt used in Lost? I did, and during a boring lecture at Uni, decided to update it. I&#8217;m using zsh currently, but this will also work for a bash shell (default with Mac OS X). I&#8217;m using TextMate [...]]]></description>
			<content:encoded><![CDATA[<p>Fancy a change from the default prompt you get in your Terminal? Want to mimic the Terminal prompt used in <a href="http://abc.go.com/primetime/lost/index">Lost</a>? I did, and during a boring lecture at Uni, decided to update it.</p>

<p><img src="http://davidwinter.me.uk/wp-content/uploads/2006/12/lost-prompt.png" alt="Lost Terminal Prompt" /></p>

<p><span id="more-43"></span></p>

<p>I&#8217;m using <code>zsh</code> currently, but this will also work for a <code>bash</code> shell (default with Mac OS X). I&#8217;m using <a href="http://macromates.com/">TextMate</a> to edit my files, but if you&#8217;re on Linux (<a href="http://www.ubuntu.com">Ubuntu</a>, right?), then just substitute the <code>mate</code> command for <code>nano</code> or your favourite editor.</p>

<p>Just to make sure that you&#8217;re in your home directory:</p>

<pre><code>cd ~
</code></pre>

<p>Now open your shell profile. If you&#8217;re using <code>zsh</code>:</p>

<pre><code>mate .zprofile
</code></pre>

<p>Or if you&#8217;re using <code>bash</code>:</p>

<pre><code>mate .bashrc
</code></pre>

<p>Now add the following line:</p>

<pre><code>export PS1="&gt;: "
</code></pre>

<p>Save and close the file.</p>

<p>Now, make sure you have the right colour scheme going on.</p>

<ol>
<li>&#8216;Terminal&#8217; from the main menu.</li>
<li>Select &#8216;Window Settings&#8217;</li>
<li>Select &#8216;Color&#8217; in the drop down</li>
<li>Select &#8216;Green on Black&#8217; from the &#8216;Standard Color Selections&#8217;</li>
<li>Click the big &#8216;Use Settings as Defaults&#8217;</li>
<li>Close the window, and you&#8217;re done</li>
</ol>

<p>Open a new Terminal window and you should get a nice Lost &#8216;style&#8217; for your prompt. Nothing too fancy&#8211;just something nice and simple. </p>

<p><img src="http://davidwinter.me.uk/wp-content/uploads/2006/12/mac-lost-prompt.png" alt="Lost style Mac prompt" /></p>

<p>Now, you only have 108 minutes to enter the code&#8230; so don&#8217;t waste time!</p>

<p>Damn. I can&#8217;t wait until the next episode.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2006/12/06/change-your-terminal-prompt-lost-style/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
