<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: tarsum-0.2 &#8211; A read only version of tarsum</title>
	<atom:link href="http://www.guyrutenberg.com/2009/04/29/tarsum-02-a-read-only-version-of-tarsum/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com/2009/04/29/tarsum-02-a-read-only-version-of-tarsum/</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Fri, 30 Jul 2010 09:05:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Goran Tornqvist</title>
		<link>http://www.guyrutenberg.com/2009/04/29/tarsum-02-a-read-only-version-of-tarsum/comment-page-1/#comment-28919</link>
		<dc:creator>Goran Tornqvist</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=315#comment-28919</guid>
		<description>I had to do a workaround due to disk space limitations since I cannot extract my archives which contain extremely large log files so this is what I came up with ...

IFS=&quot;
&quot;
for line in $(cat ${md5file})
do
  md5=$(echo ${line}&#124;awk &#039;{print $1}&#039;)
  filename=$(echo ${line}&#124;awk &#039;{print $2}&#039;)
  md5archivefile=$(tar -zxOvf myfile.tgz ${filename} 2&gt;/dev/null &#124; md5sum - &#124; awk &#039;{print $1}&#039;)

  if [ ! &quot;${md5archivefile}&quot; == &quot;${md5}&quot; ]; then
    echo &quot;NOT OK: $filename,$md5,$md5archivefile&quot;
  else
    echo &quot;OK: $filename,$md5,$md5archivefile&quot;
  fi
done</description>
		<content:encoded><![CDATA[<p>I had to do a workaround due to disk space limitations since I cannot extract my archives which contain extremely large log files so this is what I came up with &#8230;</p>
<p>IFS=&#8221;<br />
&#8221;<br />
for line in $(cat ${md5file})<br />
do<br />
  md5=$(echo ${line}|awk &#8216;{print $1}&#8217;)<br />
  filename=$(echo ${line}|awk &#8216;{print $2}&#8217;)<br />
  md5archivefile=$(tar -zxOvf myfile.tgz ${filename} 2&gt;/dev/null | md5sum &#8211; | awk &#8216;{print $1}&#8217;)</p>
<p>  if [ ! "${md5archivefile}" == "${md5}" ]; then<br />
    echo &#8220;NOT OK: $filename,$md5,$md5archivefile&#8221;<br />
  else<br />
    echo &#8220;OK: $filename,$md5,$md5archivefile&#8221;<br />
  fi<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2009/04/29/tarsum-02-a-read-only-version-of-tarsum/comment-page-1/#comment-22463</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Wed, 12 Aug 2009 08:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=315#comment-22463</guid>
		<description>@Mike: Thanks for pointing out the tarsum() signature error. I guess when I&#039;ve cleaned the script before the release I&#039;ve missed that I&#039;ve also change the signature.

I admit that I&#039;ve never tested the script with such a big file like you did. What suprised me that setting the filemode to r&#124;* slowed the script a bit (at least for my ~300MMB tar), I assumed that giving up random access, should make things faster, but it didn&#039;t


Anyway I&#039;ve fixed both issues. Thanks again.</description>
		<content:encoded><![CDATA[<p>@Mike: Thanks for pointing out the tarsum() signature error. I guess when I&#8217;ve cleaned the script before the release I&#8217;ve missed that I&#8217;ve also change the signature.</p>
<p>I admit that I&#8217;ve never tested the script with such a big file like you did. What suprised me that setting the filemode to r|* slowed the script a bit (at least for my ~300MMB tar), I assumed that giving up random access, should make things faster, but it didn&#8217;t</p>
<p>Anyway I&#8217;ve fixed both issues. Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike T.</title>
		<link>http://www.guyrutenberg.com/2009/04/29/tarsum-02-a-read-only-version-of-tarsum/comment-page-1/#comment-22458</link>
		<dc:creator>Mike T.</dc:creator>
		<pubDate>Wed, 12 Aug 2009 03:47:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=315#comment-22458</guid>
		<description>Hi.

Tried out your program using Ubuntu 9.04, but I encountered two problems.

First, in the last line of main() you called tarsum() with 4 parameters while tarsum() is defined to accept only 3 parameters.  Python is aborting the program because of this.  I&#039;m not a python programmer, but when I took out the 4th parameters, the program now runs.

Then I tried to use the program on a 21GB bzipped tarball that contains a 100GB file.  While the program runs, it runs for less than 1 second.  It also prints out a checksum that is different. The file is ok when tested using &quot;bzip2 -t&quot;.

After some research, I changed the filemode from &quot;r:*&quot; to &quot;r&#124;*&quot; to use stream IO.  After this change, &quot;tarsum-0.2 file.tar.bz2&quot; now aborts, but &quot;bunzip2 -c file.tar.bz2 &#124; tarsum-0.2&quot; now seems to work.</description>
		<content:encoded><![CDATA[<p>Hi.</p>
<p>Tried out your program using Ubuntu 9.04, but I encountered two problems.</p>
<p>First, in the last line of main() you called tarsum() with 4 parameters while tarsum() is defined to accept only 3 parameters.  Python is aborting the program because of this.  I&#8217;m not a python programmer, but when I took out the 4th parameters, the program now runs.</p>
<p>Then I tried to use the program on a 21GB bzipped tarball that contains a 100GB file.  While the program runs, it runs for less than 1 second.  It also prints out a checksum that is different. The file is ok when tested using &#8220;bzip2 -t&#8221;.</p>
<p>After some research, I changed the filemode from &#8220;r:*&#8221; to &#8220;r|*&#8221; to use stream IO.  After this change, &#8220;tarsum-0.2 file.tar.bz2&#8243; now aborts, but &#8220;bunzip2 -c file.tar.bz2 | tarsum-0.2&#8243; now seems to work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.368 seconds -->
