<?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>kdmurray.blog &#187; cli</title>
	<atom:link href="http://kdmurray.net/tag/cli/feed/" rel="self" type="application/rss+xml" />
	<link>http://kdmurray.net</link>
	<description>The crossroads of life and tech</description>
	<lastBuildDate>Sun, 20 May 2012 21:42:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ubuntu School &#8211; GUI (xubuntu-desktop) for Ubuntu Server</title>
		<link>http://kdmurray.net/2012/04/30/ubuntu-school-gui-xubuntu-desktop-for-ubuntu-server/</link>
		<comments>http://kdmurray.net/2012/04/30/ubuntu-school-gui-xubuntu-desktop-for-ubuntu-server/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 23:00:21 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[gnome desktop]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[lightdm]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1097</guid>
		<description><![CDATA[Whether it&#8217;s because you&#8217;re not fully versed in the power of the command line, or you just want to use a tool that will speed things along like gparted, the command-line isn&#8217;t always the best tool for the job. Sometimes you just need a GUI, even if it&#8217;s just for a few minutes. I&#8217;m going [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1117" title="logo-ubuntu_cof-orange-hex" src="http://kdmurray.net/wp-content/uploads/2012/02/logo-ubuntu_cof-orange-hex-150x150.png" alt="" width="100" height="100" />Whether it&#8217;s because you&#8217;re not fully versed in the power of the command line, or you just want to use a tool that will speed things along like gparted, the command-line isn&#8217;t always the best tool for the job. Sometimes you just need a GUI, even if it&#8217;s just for a few minutes. I&#8217;m going to walk through how to do the installation on Ubuntu 11.10 with the assumption that you only want the GUI occasionally, and don&#8217;t want it consuming server resources all the time.</p>

<p>The first step is to get the GUI tools installed.
<code>sudo apt-get update<br />
sudo apt-get upgrade<br />
sudo apt-get install xubuntu-desktop</code></p>

<p>That was the simple part. At this point you now have the GUI installed, but it will start the GUI every time the system boots, loading all of that extra cruft into memory. The next steps that I followed from <a title="Disable GUI Boot in Ubuntu 11.10" href="http://www.techienote.com/2012/01/disable-gui-boot-in-ubuntu-11-10.html" target="_blank">a post on Techinote</a> shows the steps to disable the automatic startup of the GUI environment.</p>

<p><code>
sudo apt-get install lightdm<br />
sudo nano /etc/default/grub</code></p>

<p>find the line <code>GRUB_CMDLINE_LINUX_DEFAULT</code> and set it to <code>GRUB_CMDLINE_LINUX_DEFAULT="text"</code></p>

<p><code>
sudo update-grub<br />
sudo update-rc.d -f lightdm remove<br />
sudo shutdown -r now</code></p>

<p><strong>Done!</strong></p>

<p>Your system will now be at the text-based login screen (as it was before this all started). When you need to use the graphical environment, simply type startx and it will move you into an already authenticated GUI desktop environment. This will allow you to setup and configure tools with a GUI (like CrashPlan) without having to rely the UI being constantly loaded and running in the background.</p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/04/30/ubuntu-school-gui-xubuntu-desktop-for-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu School &#8211; Get Rolling with Webmin on Ubuntu Server 11.10</title>
		<link>http://kdmurray.net/2012/02/29/ubuntu-school-get-rolling-with-webmin-on-ubuntu-server-11-10/</link>
		<comments>http://kdmurray.net/2012/02/29/ubuntu-school-get-rolling-with-webmin-on-ubuntu-server-11-10/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 08:19:36 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administrative]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1132</guid>
		<description><![CDATA[Even if some Linux purists would have you believe the command-line is the only way to go, the pragmatist in me will always take an appropriate GUI over a complicated command-line any day. You can run a lot of powerful services for your home network using one or more Ubuntu server machines. With the right [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1117" style="margin: 8px;" title="logo-ubuntu_cof-orange-hex" src="http://kdmurray.net/wp-content/uploads/2012/02/logo-ubuntu_cof-orange-hex-150x150.png" alt="" width="100" height="100" />Even if some Linux purists would have you believe the command-line is the only way to go, the pragmatist in me will always take an appropriate GUI over a complicated command-line any day. You can run a lot of powerful services for your home network using one or more Ubuntu server machines. With the right tools you don&#8217;t need to be a Linux expert to make that happen.</p>

<p>The tool of choice is <a title="Webmin" href="http://webmin.com/" target="_blank">Webmin</a>. This is a set of web-based tools which allow you to control virtually every piece of server-side software on you Ubuntu server. The GUI is intuitive and straight-forward, the documentation is excellent, and the project is under active development.</p>

<p>Because Webmin isn&#8217;t in the standard repositories you will have to do a couple of quick command-line changes to configure your system to be able to find and download the apt package.</p>

<p><code>sudo nano /etc/apt/sources.list</code></p>

<p>Once the file is open, add these lines to the bottom of the file</p>

<p><code>#########################</p>

<h2>Package Sources for Webmin</h2>

<p>deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib</code></p>

<p>Those lines will add the necessary sources to apt for it to find the Webmin package. The Webmin package has also been digitally signed by its author. By default you will need to download the author&#8217;s key so that apt can use it to verify the Webmin package at install time. Fortunately, this is really easy to do.</p>

<p><code>wget http://webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc</code></p>

<p>Now that all the prep work is done, it&#8217;s time to install Webmin.</p>

<p><code>sudo apt-get update
sudo apt-get install webmin</code></p>

<p>All done! Now you can access administrative functions of your server&#8217;s services from the Webmin console: https://yourservername:10000/. This URL is also shown in the last few lines of the apt install details that are ouput to the command-line.</p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/02/29/ubuntu-school-get-rolling-with-webmin-on-ubuntu-server-11-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Shell Scripts from the Finder in OS X</title>
		<link>http://kdmurray.net/2012/02/27/running-shell-scripts-from-the-finder-in-os-x/</link>
		<comments>http://kdmurray.net/2012/02/27/running-shell-scripts-from-the-finder-in-os-x/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 08:43:24 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Soapbox]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[bad apple]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[finder]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1190</guid>
		<description><![CDATA[One of the things that drives me insane about the Mac on occasion is the ability of OS X to make some of the simplest &#8220;power-user&#8221; tasks very difficult. Case in point &#8211; the ability to execute a shell script from a finder window (or by extension, the desktop). In most sane operating systems, including [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1206" title="Bad Apple Logo" src="http://kdmurray.net/wp-content/uploads/2012/02/applelogo-150x150.png" alt="Bad Apple" width="150" height="150" />One of the things that drives me insane about the Mac on occasion is the ability of OS X to make some of the simplest &#8220;power-user&#8221; tasks very difficult. Case in point &#8211; the ability to execute a shell script from a finder window (or by extension, the desktop).</p>

<p>In most sane operating systems, including Linux and Windows, if you double-click on an executable file, it executes. It&#8217;s just that simple. If you create a batch file on Windows (anything ending in .bat or .cmd), the operating system treats that file type as executable and will try to run the contents as command-line commands. In Linux, an operating system which is similar under the hood to OS X, you need to set the &#8220;executable&#8221; bit in the permissions. This is certainly more of a super-user type task than simply renaming the file, but still quite simple &#8212; and consistent across the POSIX world&#8230; except for Apple.</p>

<p><code>chmod +x myscript.sh</code></p>

<p>So the question is, how do I do this on my Mac? The answer I&#8217;ve been given by several people until today was that you would need to use AppleScript or Automator (or Xcode) to create a program that could be run from the Mac GUI. As ludicrous as it seemed, Apple&#8217;s tendency to force users to do things the &#8220;Apple way&#8221; made that quite believable. However I found a <a title="Run shell scripts from Finder" href=" http://adamyoung.net/OS-X-Run-Shell-Scripts-From-Finder" target="_blank">post today on Adam Young&#8217;s blog</a> from back in 2008 which showed that it is, in fact, possible to do this &#8212; it&#8217;s just a bit harder than on any other OS. Essentially you have to do both the Linux (<a title="chmod on Wikipedia" href="http://en.wikipedia.org/wiki/Chmod" target="_blank">chmod</a>) step, and the Windows (specific file extension) step.</p>

<p><code>mv myscript.sh myscript.command
chmod +x myscript.command</code></p>

<p>You need to use the .command extension for the Finder to actually attempt to run your shell script. An identical file with the execute bit set but with a .sh extension will simply open up in Xcode (or whatever editor you have set for .sh files).</p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/02/27/running-shell-scripts-from-the-finder-in-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu School &#8211; Add an Existing User to a Group</title>
		<link>http://kdmurray.net/2012/02/21/ubuntu-school-add-an-existing-user-to-a-group/</link>
		<comments>http://kdmurray.net/2012/02/21/ubuntu-school-add-an-existing-user-to-a-group/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 16:40:39 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[groups]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[user management]]></category>
		<category><![CDATA[usermod]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1130</guid>
		<description><![CDATA[Occasionally you need to grant an existing user some additional permissions to files, directories or applications. This typically means some kind of change in your permissions settings for the object in question. But because you can only have a single owner for a given object you need to be careful making these changes. Something you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1117" title="logo-ubuntu_cof-orange-hex" src="http://kdmurray.net/wp-content/uploads/2012/02/logo-ubuntu_cof-orange-hex-150x150.png" alt="" width="100" height="100" />Occasionally you need to grant an existing user some additional permissions to files, directories or applications. This typically means some kind of change in your permissions settings for the object in question. But because you can only have a single owner for a given object you need to be careful making these changes.</p>

<p>Something you can do, though, is extend the permissions on the object to a set of users by way of a group. Logically, a group is nothing more than a named collection of users who all have the same access (by way of that group) to some resource. Users in Ubuntu typically carry one primary, and one or more secondary groups (I won&#8217;t get into the differences here).</p>

<p>By adding group permissions to your resources (ie give the &#8216;payroll&#8217; group read/write access to the &#8216;HR&#8217; folder) you can simply add users to and remove users from the appropriate groups and be confident that their level of access to the resources on your machine is set correctly.</p>

<p>To add an existing user to an existing group:</p>

<p><code>sudo usermod -a -G payroll graymond</code></p>

<p>To remove a user from a group you use the same command. The catch is, you remove a user from a group by re-adding all of their groups and simply omitting the group you wish to remove them from.</p>

<p><code>sudo usermod -nG mkirkpatrick</code></p>

<p>The system will show you a list of the user&#8217;s groups.</p>

<p><code>marketing sales vanprinters torprinters</code></p>

<p>Then you simply run the usermod command as above, removing the group in question (in this case vanprinters)</p>

<p><code>usermod -G marketing,sales,torprinters mkirkpatrick</code></p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/02/21/ubuntu-school-add-an-existing-user-to-a-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu School &#8211; sudo Your Last Command</title>
		<link>http://kdmurray.net/2012/02/14/ubuntu-school-sudo-your-last-command/</link>
		<comments>http://kdmurray.net/2012/02/14/ubuntu-school-sudo-your-last-command/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 16:40:45 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[repeat command]]></category>
		<category><![CDATA[repeat last]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[time savers]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1099</guid>
		<description><![CDATA[Sometimes we just forget that we need to specify elevated privileges on our Ubuntu machines. I do it all the time, particularly when I&#8217;m setting up a new machine. Thankfully there&#8217;s a shortcut for those of us who are forgetful. If I want to restart the box I can use a command like: shutdown -r [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1117" title="logo-ubuntu_cof-orange-hex" src="http://kdmurray.net/wp-content/uploads/2012/02/logo-ubuntu_cof-orange-hex-150x150.png" alt="" width="100" height="100" />Sometimes we just forget that we need to specify elevated privileges on our Ubuntu machines. I do it all the time, particularly when I&#8217;m setting up a new machine.</p>

<p>Thankfully there&#8217;s a shortcut for those of us who are forgetful. If I want to restart the box I can use a command like:</p>

<p><code>shutdown -r now</code></p>

<p>But of course that command requires elevated privileges:</p>

<p><code>shutdown: Need to be root</code></p>

<p>With the fantastic !! argument for sudo you can repeat your last terminal command:</p>

<p><code>sudo !!</code></p>

<p>Now you can quickly and efficiently re-run that last command you forgot to sudo!!</p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/02/14/ubuntu-school-sudo-your-last-command/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu School &#8211; DHCP Release and Renew</title>
		<link>http://kdmurray.net/2012/02/14/ubuntu-school-dhcp-release-and-renew/</link>
		<comments>http://kdmurray.net/2012/02/14/ubuntu-school-dhcp-release-and-renew/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 16:39:47 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dhclient]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[eth0]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[renew]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1113</guid>
		<description><![CDATA[It&#8217;s not uncommon to need to release/renew the IP address for a given machine. This is particularly true if you&#8217;re doing any kind of maintenance on your network, or are troubleshooting pretty much any kind of Internet problem. I never seem to remember how to do this, so I&#8217;m including this post as much for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1117" title="logo-ubuntu_cof-orange-hex" src="http://kdmurray.net/wp-content/uploads/2012/02/logo-ubuntu_cof-orange-hex-150x150.png" alt="" width="100" height="100" />It&#8217;s not uncommon to need to release/renew the IP address for a given machine. This is particularly true if you&#8217;re doing any kind of maintenance on your network, or are troubleshooting pretty much any kind of Internet problem. I never seem to remember how to do this, so I&#8217;m including this post as much for my own benefit as anything.</p>

<p>What I&#8217;m talking about is the Ubuntu equivalent of these windows commands
<code>ipconfig /release
ipconfig /renew</code></p>

<p>From an Ubuntu terminal type:
<code>sudo dhclient -r
sudo dhclient</code></p>

<p>Much like the Windows equivalents you can also specify these actions for a specific interface if your situation requires.</p>

<p><code>sudo dhclient eth0</code></p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/02/14/ubuntu-school-dhcp-release-and-renew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu School &#8211; Creating a New User</title>
		<link>http://kdmurray.net/2012/02/11/ubuntu-school-creating-a-new-user/</link>
		<comments>http://kdmurray.net/2012/02/11/ubuntu-school-creating-a-new-user/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 23:47:42 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[adduser]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[useradd]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=1094</guid>
		<description><![CDATA[There are two built-in commands for creating a user from the command-line in Ubuntu: useradd and adduser. useradd is the older command which has, for the most part, been deprecated in favour of the more user-friendly adduser command. Both will allow you to create new user accounts, set up home directories and generally move in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1117" title="logo-ubuntu_cof-orange-hex" src="http://kdmurray.net/wp-content/uploads/2012/02/logo-ubuntu_cof-orange-hex-150x150.png" alt="" width="100" height="100" />There are two built-in commands for creating a user from the command-line in Ubuntu: useradd and adduser. useradd is the older command which has, for the most part, been deprecated in favour of the more user-friendly adduser command. Both will allow you to create new user accounts, set up home directories and generally move in the right direction, but adduser will prompt you for information you didn&#8217;t include whereas useradd will assume you didn&#8217;t want those things (ie create the home directory).</p>

<p><code>sudo adduser theboss</code></p>

<p>will produce an output similar to</p>

<p><code>Adding user <code>theboss' ...
Adding new group</code>theboss' (1001) ...
Adding new user <code>theboss' (1001) with group</code>theboss' ...
Creating home directory <code>/home/theboss' ...
Copying files from</code>/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for theboss
Enter the new value, or press ENTER for the default
Full Name []: Joe Bossman
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y</code></p>

<p>And there you are! Happy user-creating!</p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2012/02/11/ubuntu-school-creating-a-new-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating ISO Images from the OSX Command Line</title>
		<link>http://kdmurray.net/2010/01/09/creating-iso-images-from-the-osx-command-line/</link>
		<comments>http://kdmurray.net/2010/01/09/creating-iso-images-from-the-osx-command-line/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 08:31:26 +0000</pubDate>
		<dc:creator>kdmurray</dc:creator>
				<category><![CDATA[Lessons]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://kdmurray.net/?p=810</guid>
		<description><![CDATA[A super fast way to create ISO images (or any kind of bit for bit copies) from the OS X (or linux, or unix) command line is to use the DD command. This isn&#8217;t without it&#8217;s risks since the DD command will duplicate byte for byte all data from one location to another, but once [...]]]></description>
			<content:encoded><![CDATA[<p>A super fast way to create ISO images (or any kind of bit for bit copies) from the OS X (or linux, or unix) command line is to use the DD command. This isn&#8217;t without it&#8217;s risks since the DD command will duplicate byte for byte all data from one location to another, but once you&#8217;ve found the necessary information you can easily replicate data.</p>

<p>I needed to create a copy of my Windows XP installation CD to use for setting up new virtual machines. Since it&#8217;s quicker to install VMs from an ISO image rather than from the installation media I wanted an ISO of my CD. The built in OS X disk utility can make this work&#8230; in theory. My copy of disk utility (on Snow Leopard) didn&#8217;t want to recognize the CD. So I turned to my command line knowledge.</p>

<p>I should also note that before you can read the CD using DD, you will need to unmount it:</p>

<p><code>sudo umount /dev/disk1s0</code></p>

<p>You&#8217;ll be prompted for your administrator password, then you&#8217;re in business.</p>

<p>To create an image of a CD (or DVD or anything else&#8230;) use the following:</p>

<p><code>dd if=/dev/disk1s0 of=/Users/kdmurray/Desktop/WindowsXP.iso bs=64k</code></p>

<ul>
    <li>if= input file, in this case our Windows XP CD</li>
    <li>of= output file, the actual ISO file you want created</li>
    <li>bs= block size, the size of chunks the tool will work with</li>
</ul>

<p>I did a few speed tests at 16k, 32k, 64k, 128k, 256k and 1M and found that the 64k seemed to be the ideal block size on my machine. This will vary by CPU, and possibly by hard drive controller, so do a few contolled tests first. To do a test, start the copy process, then stop it after 20-30s (ctrl-c). Whichever one copied the most in 30s is the one you should use.</p>

<p>That&#8217;s all she wrote, folks. Happy command-lining. <img src='http://kdmurray.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kdmurray.net/2010/01/09/creating-iso-images-from-the-osx-command-line/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 746/770 objects using disk: basic

Served from: kdmurray.net @ 2012-05-23 08:35:42 -->
