<?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: Recursive MD5 Sum Script</title>
	<atom:link href="http://www.thelinuxblog.com/recursive-md5-sum-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thelinuxblog.com/recursive-md5-sum-script/</link>
	<description>The Linux Blog, General Linux, Shell Scripts</description>
	<lastBuildDate>Fri, 17 May 2013 01:16:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Jonathan</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-6854</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sat, 28 Jul 2012 23:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-6854</guid>
		<description><![CDATA[I&#039;ve had a need for verifying integrity of backups/mirrors which contain a large number of files and ended up writing a command-line program called MassHash.  It&#039;s written in Python.  A GTK+ Launcher is also available.  You may want to check it out...

http://code.google.com/p/masshash/]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve had a need for verifying integrity of backups/mirrors which contain a large number of files and ended up writing a command-line program called MassHash.  It&#8217;s written in Python.  A GTK+ Launcher is also available.  You may want to check it out&#8230;</p>
<p><a href="http://code.google.com/p/masshash/" rel="nofollow">http://code.google.com/p/masshash/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enars</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-6853</link>
		<dc:creator>enars</dc:creator>
		<pubDate>Sat, 28 Jul 2012 09:09:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-6853</guid>
		<description><![CDATA[Another solution would be the md5deep utility -&gt;

http://md5deep.sourceforge.net/

under terminal  (ubuntu 10.10)

$ md5deep   

$ sudo apt-get install md5deep]]></description>
		<content:encoded><![CDATA[<p>Another solution would be the md5deep utility -&gt;</p>
<p><a href="http://md5deep.sourceforge.net/" rel="nofollow">http://md5deep.sourceforge.net/</a></p>
<p>under terminal  (ubuntu 10.10)</p>
<p>$ md5deep   </p>
<p>$ sudo apt-get install md5deep</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben in Seattle</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-3250</link>
		<dc:creator>Ben in Seattle</dc:creator>
		<pubDate>Sun, 01 Aug 2010 04:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-3250</guid>
		<description><![CDATA[Uhh... duh.... I neglected to remove the &quot;/&quot; or &quot;$1&quot; from my tweak of David E&#039;s version.  Not a big deal, since I think my later version is better, but I feel silly now.]]></description>
		<content:encoded><![CDATA[<p>Uhh&#8230; duh&#8230;. I neglected to remove the &#8220;/&#8221; or &#8220;$1&#8243; from my tweak of David E&#8217;s version.  Not a big deal, since I think my later version is better, but I feel silly now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben in Seattle</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-3249</link>
		<dc:creator>Ben in Seattle</dc:creator>
		<pubDate>Sun, 01 Aug 2010 04:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-3249</guid>
		<description><![CDATA[I love seeing the evolution of this script in the comments as it gets tighter and better. It really shows you how Unix is a toolbox: even with only basic knowledge of the shell you can get your work done, but as you become an expert you &lt;i&gt;find&lt;/i&gt;sharp, precise tools and the knowledge to handle them.

David E&#039;s version looks well-nigh perfect, but it has a couple extraneous parts that can be cut out. First is the slash in &quot;&lt;b&gt;./&lt;/b&gt;&quot; which can just be typed &quot;&lt;b&gt;.&lt;/b&gt;&quot;.  The second is the &quot;&lt;b&gt;$1&lt;/b&gt;&quot; which I think was a typo or a remnant of a shell script.

So, my tweak on his version would be:

&lt;code&gt;find ./ -type f -exec md5sum $1 {} \; &gt; checksums.md5&lt;/code&gt;

Or, if you&#039;re using &lt;b&gt;GNU&lt;/b&gt;/Linux (which you probably are if you&#039;re using the Linux kernel), you can omit the period since GNU find defaults to searching the current working directory. Also, instead of using &quot;&lt;b&gt;\;&lt;/b&gt;&quot;, which runs a separate md5sum process for every file, GNU find has the nifty plus syntax, &quot;&lt;b&gt;+&lt;/b&gt;&quot;, which passes all the filenames found as command line arguments to one instance of md5sum. That will make it run faster and also has the benefit that plus is not a shell special character so it doesn&#039;t have to be escaped by a backslash. So, my final recommendation (though I&#039;m sure somebody will come along and improve upon this), is:

&lt;code&gt;find -type f -exec md5sum {} + &gt; checksums.md5&lt;/code&gt;

Of course, to check the sums, it&#039;s still the same &lt;code&gt;md5sum -c checksums.md5&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I love seeing the evolution of this script in the comments as it gets tighter and better. It really shows you how Unix is a toolbox: even with only basic knowledge of the shell you can get your work done, but as you become an expert you <i>find</i>sharp, precise tools and the knowledge to handle them.</p>
<p>David E&#8217;s version looks well-nigh perfect, but it has a couple extraneous parts that can be cut out. First is the slash in &#8220;<b>./</b>&#8221; which can just be typed &#8220;<b>.</b>&#8220;.  The second is the &#8220;<b>$1</b>&#8221; which I think was a typo or a remnant of a shell script.</p>
<p>So, my tweak on his version would be:</p>
<p><code>find ./ -type f -exec md5sum $1 {} \; &gt; checksums.md5</code></p>
<p>Or, if you&#8217;re using <b>GNU</b>/Linux (which you probably are if you&#8217;re using the Linux kernel), you can omit the period since GNU find defaults to searching the current working directory. Also, instead of using &#8220;<b>\;</b>&#8220;, which runs a separate md5sum process for every file, GNU find has the nifty plus syntax, &#8220;<b>+</b>&#8220;, which passes all the filenames found as command line arguments to one instance of md5sum. That will make it run faster and also has the benefit that plus is not a shell special character so it doesn&#8217;t have to be escaped by a backslash. So, my final recommendation (though I&#8217;m sure somebody will come along and improve upon this), is:</p>
<p><code>find -type f -exec md5sum {} + &gt; checksums.md5</code></p>
<p>Of course, to check the sums, it&#8217;s still the same <code>md5sum -c checksums.md5</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spargonaut</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-3076</link>
		<dc:creator>spargonaut</dc:creator>
		<pubDate>Sun, 10 Jan 2010 02:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-3076</guid>
		<description><![CDATA[this is great.
thanks to everyone for the input.

I&#039;m trying to accomplish something similar ( in addition to sharpening my shell chops ).
After creating an md5sum for each file, I want it to start back at the beginning of the file and search for duplicates, and write the possible duplicates to another file.

this thread gives me a great head start.

-js]]></description>
		<content:encoded><![CDATA[<p>this is great.<br />
thanks to everyone for the input.</p>
<p>I&#8217;m trying to accomplish something similar ( in addition to sharpening my shell chops ).<br />
After creating an md5sum for each file, I want it to start back at the beginning of the file and search for duplicates, and write the possible duplicates to another file.</p>
<p>this thread gives me a great head start.</p>
<p>-js</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David E.</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-2822</link>
		<dc:creator>David E.</dc:creator>
		<pubDate>Fri, 27 Nov 2009 15:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-2822</guid>
		<description><![CDATA[I like the comment about using the following command: &quot;find * ! -type d -print0 &#124; xargs -0 md5sum&quot;

You could accomplish all that by using the find command as follows: &quot;find ./ -type f -exec md5sum $1 {} \;&quot;

The important thing to note about the script in this post is that when parsing files by filename, its usually best to avoid using the &quot;for&quot; command; as it uses a space as the default field separator... This means that if it runs across a filename with a space in it, which is common if you are scripting against a file server, it will run into a lot of problems.

If you have an aversion against using find, it would be more advisable to do the following: &quot;ls &#124; while read FILE; do md5sum &quot;$FILE&quot;; done&quot;]]></description>
		<content:encoded><![CDATA[<p>I like the comment about using the following command: &#8220;find * ! -type d -print0 | xargs -0 md5sum&#8221;</p>
<p>You could accomplish all that by using the find command as follows: &#8220;find ./ -type f -exec md5sum $1 {} \;&#8221;</p>
<p>The important thing to note about the script in this post is that when parsing files by filename, its usually best to avoid using the &#8220;for&#8221; command; as it uses a space as the default field separator&#8230; This means that if it runs across a filename with a space in it, which is common if you are scripting against a file server, it will run into a lot of problems.</p>
<p>If you have an aversion against using find, it would be more advisable to do the following: &#8220;ls | while read FILE; do md5sum &#8220;$FILE&#8221;; done&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheLinuxBlog.com</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-2800</link>
		<dc:creator>TheLinuxBlog.com</dc:creator>
		<pubDate>Thu, 12 Nov 2009 14:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-2800</guid>
		<description><![CDATA[@APROTIM nothing is wrong with md5sum &lt;DIR&gt;/* for finding files within a directory, but it won&#039;t go into the directories. It would basically do the same thing as &quot;md5sum $directory&#039;/&#039;$x;&quot; the $x is there in case I wanted to extend it to multiple levels.]]></description>
		<content:encoded><![CDATA[<p>@APROTIM nothing is wrong with md5sum <dir>/* for finding files within a directory, but it won&#8217;t go into the directories. It would basically do the same thing as &#8220;md5sum $directory&#8217;/'$x;&#8221; the $x is there in case I wanted to extend it to multiple levels.</dir></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aprotim</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-2798</link>
		<dc:creator>aprotim</dc:creator>
		<pubDate>Wed, 11 Nov 2009 21:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-2798</guid>
		<description><![CDATA[What&#039;s wrong with:

md5sum $directory/*

It will print errors to stderr for non-plain files found, but stdout will have the hashes, as required...]]></description>
		<content:encoded><![CDATA[<p>What&#8217;s wrong with:</p>
<p>md5sum $directory/*</p>
<p>It will print errors to stderr for non-plain files found, but stdout will have the hashes, as required&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: der Dennis</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-2739</link>
		<dc:creator>der Dennis</dc:creator>
		<pubDate>Fri, 09 Oct 2009 07:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-2739</guid>
		<description><![CDATA[Another solution would be the md5deep utility -&gt; 

http://md5deep.sourceforge.net/]]></description>
		<content:encoded><![CDATA[<p>Another solution would be the md5deep utility -&gt; </p>
<p><a href="http://md5deep.sourceforge.net/" rel="nofollow">http://md5deep.sourceforge.net/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: log69</title>
		<link>http://www.thelinuxblog.com/recursive-md5-sum-script/comment-page-1/#comment-1815</link>
		<dc:creator>log69</dc:creator>
		<pubDate>Fri, 30 Jan 2009 14:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/recursive-md5-sum-script/#comment-1815</guid>
		<description><![CDATA[or a better one ;)

find ! -type d -print0 &#124; xargs -0 md5sum &#124; md5sum]]></description>
		<content:encoded><![CDATA[<p>or a better one ;)</p>
<p>find ! -type d -print0 | xargs -0 md5sum | md5sum</p>
]]></content:encoded>
	</item>
</channel>
</rss>
