<?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>The Changelog &#187; datapacker</title>
	<atom:link href="http://changelog.complete.org/archives/tag/datapacker-s9y/feed" rel="self" type="application/rss+xml" />
	<link>http://changelog.complete.org</link>
	<description>Viewpoints on technology, society, and government</description>
	<lastBuildDate>Wed, 08 Feb 2012 09:48:11 +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>New version of datapacker</title>
		<link>http://changelog.complete.org/archives/760-new-version-of-datapacker</link>
		<comments>http://changelog.complete.org/archives/760-new-version-of-datapacker#comments</comments>
		<pubDate>Thu, 25 Sep 2008 06:46:00 +0000</pubDate>
		<dc:creator>John Goerzen</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[datapacker]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://changelog2.complete.org/archives/760-new-version-of-datapacker.html</guid>
		<description><![CDATA[I wrote before about datapacker, but I didn&#8217;t really describe what it is or how it&#8217;s different from other similar programs. So, here&#8217;s the basic problem the other day. I have a bunch of photos spanning nearly 20 years stored on my disk. I wanted to burn almost all of them to DVDs. I can [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://changelog.complete.org/posts/707-datapacker.html">wrote before</a> about <a href="http://software.complete.org/datapacker">datapacker</a>, but I didn&#8217;t really describe what it is or how it&#8217;s different from other similar programs.</p>
<p>So, here&#8217;s the basic problem the other day.  I have a bunch of photos spanning nearly 20 years stored on my disk.  I wanted to burn almost all of them to DVDs.  I can craft rules with find(1) to select the photos I want, and then I need to split them up into individual DVDs.  There are a number of tools that did that, but not quite powerful enough for what I want.</p>
<p>When you think about splitting things up like this, there are a lot of ways you can split things.  Do you want to absolutely minimize the number of DVDs?  Or do you keep things in a sorted order, and just start a new DVD when the first one fills up?  Maybe you are adding an index to the first DVD, and need a different size for it.</p>
<p>Well, datapacker 1.0.1 can solve all of these problems.  As its manpage states, &#8220;datapacker is a tool in the traditional Unix style; it can be used in pipes and call other tools.&#8221;  datapacker accepts lists of files to work on as command-line parameters, piped in from find, piped in from find -print0.  It can also output its results in various parser-friendly formats, call other programs directly in a manner similar to find -exec, or create hardlink or symlink forests for ease of burning to DVD (or whatever you&#8217;ll be doing with it).</p>
<p>So, what I did was this:</p>
<p><code><br />
find Pictures -type f -and -not -iwholename "Pictures/2001/*.tif" -and \<br />
 -not -wholename "Pictures/Tabor/*" -print0 | \<br />
  datapacker -0Dp -s 4g --sort -a hardlink -b ~/bins/%03d -<br />
</code></p>
<p>So I generate a list of photos to process with find.  Then datapacker is told to read the list of files to process in a null-separated way (-0), generate bins that mimic the source directory structure (-D), organize into bins preserving order (-p), use a 4GB size per bin (-s 4g), sort the input prior to processing (&#8211;sort), create hardlinks for the files (-a hardlink), and then name the bins with a 3-digit number under ~/bins, and finally, read the list of files from stdin (-).  By using &#8211;sort and -p, the output will be sorted by year (Pictures/2000, Pictures/2001, etc), so that photos from all years aren&#8217;t all mixed in on the discs.</p>
<p>This generates 13 DVD-sized bins in a couple of seconds.  A simple for loop then can use mkisofs or growisofs to burn them.</p>
<p>The datapacker manpage also contains an example for calling mkisofs directly for each bin, generating ISOs without even an intermediate hardlink forest.</p>
<p>So, when I wrote about datapacker last time, people asked how it differed from other tools.  Many of them had different purposes in mind.  So I&#8217;m not trying to say one tool or the other is better, just highlighting differences.  Most of these appear to not have anything like datapacker &#8211;deep-links.</p>
<p>gaffiter: No xargs-convenient output, no option to pass results directly to shell commands.  Far more complex source (1671 lines vs. 228 lines)</p>
<p>dirsplit: Park of mkisofs package.  Uses a random iterative approach, few options.</p>
<p>packcd: Similar packing algorithm options, but few input/input options.  No ability to read a large file list from stdin.  Could have issues with command line length.</p>
]]></content:encoded>
			<wfw:commentRss>http://changelog.complete.org/archives/760-new-version-of-datapacker/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

