<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=5565&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / sha512sum...]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=5565</link>
		<description><![CDATA[The most recent posts in sha512sum....]]></description>
		<lastBuildDate>Thu, 04 May 2023 18:15:42 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=42150#p42150</link>
			<description><![CDATA[<p>I have been planning to reinstall os to my desktop so when i get that done, i hope that all the weird behaviour goes away or i find out if my hardware is faulty.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Thu, 04 May 2023 18:15:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=42150#p42150</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=42149#p42149</link>
			<description><![CDATA[<p>I looked at those pre-mentioned scripts again. And then remembered that first i commented out the rows that generated the partial digests. And after that, removed most of the commented lines. So now it is bit difficult to reproduce the problem-causing files.<br />Anyways, i found a partial digest file and uploaded it to pastebin.com . It looks a bit weird(i mean those empty lines, not filenames, those are obfuscated) but &quot;sha512sum -c&quot; didn&#039;t complain. <a href="http://pastebin.com/4aCjnCLe" rel="nofollow">pastebin.com/4aCjnCLe</a><br />I can show which commands i used to make that file. For...do...done, awk, echo and sha51sum were used. That much i can tell.<br />Mostly pointless, i know.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Thu, 04 May 2023 18:11:04 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=42149#p42149</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41167#p41167</link>
			<description><![CDATA[<p>I have taken account the path. I think the problem are some non-visible characters in the lists. Making the hash list in many parts seemed like a good idea for a while but now i&#039;m not so sure anymore. Maybe i&#039;ll upload the full file or partials into pastebin some day.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Fri, 17 Feb 2023 21:43:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41167#p41167</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41165#p41165</link>
			<description><![CDATA[<div class="codebox"><pre><code>tmp=$(sha512sum $sourcedir/$file | grep -v $not_this_file)</code></pre></div><div class="codebox"><pre><code>sha512sum $sourcedir/*.zz &gt; part2.txt</code></pre></div><p>Have you looked at what those &quot;sha512sum&quot; runs generate?</p><p>Yes, you may concatenate &quot;shasum.txt&quot; snippets. But you must be sure that the pathnames are the correct ones for when that &quot;shasum.txt&quot; is used.</p><p>Afaict, in your example (in the previous post) the pathnames in the file include &quot;$sourcedir/&quot; as path prefix, and therefore the checksum verification needs to be done with the files being in the &quot;$sourcedir/&quot; subdirectory of the current working directory.</p><p>If I may venture an opinion though, it generally makes the code less complicated and more easily reviewable when having a &quot;shasum.txt&quot; for all files in a directory be generated only once, when that directory is fully populated. Basically, your examples &quot;like this, it works &quot; are examples of good coding practice whereas the other examples &quot;like this, it doesn&#039;t work&quot; leave a bit in that respect. Which perhaps illustrates the point.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 17 Feb 2023 21:14:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41165#p41165</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41162#p41162</link>
			<description><![CDATA[<div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>Are those the actual commands?<br />Are the files in <span class="bbc">a/a</span>the same as in <span class="bbc">a/</span>?<br />Or have you transcribed into some notional commands to illustrate what you wanted to do?<br />(or actually a near miss thereof)</p><p>I don&#039;t think any of your options applies, since it very likely is just a user error.</p></div></blockquote></div><p>The actual commands are a bit different from the previous posts. I thought i could reproduce the problem that way but no.</p><p>The basic idea is:&quot;copy files mentioned in this list, from source to destination and make also a list of digests containing almost all of the mentioned files&quot;. </p><div class="codebox"><pre><code>for file in $list do
  cp $sourcedir/$file $destdir
  tmp=$(sha512sum $sourcedir/$file | grep -v $not_this_file)
  echo $tmp &gt;&gt; part1.txt
done

sha512sum $sourcedir/*.zz &gt; part2.txt
cp $sourcedir/*.zz $destdir
cp part*.txt $destdir

cd $destdir
mv part1,txt sums.txt
cat part2.txt &gt;&gt; sums.txt</code></pre></div><p>would be a very close approximation to the actual script. I guess it&#039;s the second or third row inside for-loop where things go wrong. Haven&#039;t found yet a perfect solution. With awk, i got rid of most of the complaints from &quot;sha512sum -c&quot;.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Fri, 17 Feb 2023 19:23:11 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41162#p41162</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41161#p41161</link>
			<description><![CDATA[<div class="quotebox"><cite>nahkhiirmees wrote:</cite><blockquote><div><p>Should it be possible, to combine a working digest list from smaller ones, with cat, mv and sha512sum?</p></div></blockquote></div><p>I&#039;ll answer to myself:it is possible.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Fri, 17 Feb 2023 19:12:12 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41161#p41161</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41157#p41157</link>
			<description><![CDATA[<p>The first thing I&#039;d try is to repeat round 1, <span class="bbc">cp sums.txt sums_1.txt</span>, repeat round 2 and <span class="bbc">diff sums_1.txt sums.txt</span> to see if they differ.</p>]]></description>
			<author><![CDATA[dummy@example.com (chris2be8)]]></author>
			<pubDate>Fri, 17 Feb 2023 17:02:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41157#p41157</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41156#p41156</link>
			<description><![CDATA[<p>Should it be possible, to combine a working digest list from smaller ones, with cat, mv and sha512sum?</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Fri, 17 Feb 2023 15:39:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41156#p41156</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41155#p41155</link>
			<description><![CDATA[<p>Last night, while trying to distillate the essential parts of the problem, it seems that i was not precise enough. Noise is needed along with the signal. <br />Another try:</p><p>Try 1</p><div class="codebox"><pre><code>mount /dev/sdaX /mnt/a -o ro
mount /dev/sdaY /mnt/b -o rw

cp /mnt/a/*.xx /mnt/b
cp /mnt/a/*.yy /mnt/b
cp /mnt/a/*.zz /mnt/b
cd /mnt/b
sha512sum ./* &gt; sums.txt
sha512sum -c sums.txt</code></pre></div><p>sha512sum says the files in the list are all OK<br />after that another round:</p><div class="codebox"><pre><code>umount /mnt/a
rm -rf /mnt/b/*
mount /dev/sdaX /mnt/a -o ro
cd /mnt/a
sha512sum ./*.xx &gt; part1.txt
sha512sum ./*.yy &gt;&gt; part1.txt
sha512sum ./*.zz &gt; part2.txt
cp /mnt/a/*.xx /mnt/b;cp /mnt/a/*.yy /mnt/b;cp /mnt/a/*.zz /mnt/b;cp /mnt/a/part*.txt /mnt/b
cd /mnt/b
mv part1.txt sums.txt
cat part2.txt &gt;&gt; sums.txt
sha512sum -c sums.txt</code></pre></div><p>and only .xx files receive OK from sha512sum -c .<br />.zz files are supposed to change more often than .yy files and .yy files are supposed to change more often than .xx - files. So it seemed like a good idea to split the file sums.txt in 3 parts. Or to be more precise, build the file sums.txt from 2 or 3 files.</p><p>I tried to look at those .txt files with hexdump. I may have found the characters that cause the problem with &quot;sha512sum -c&quot; but i haven&#039;t figured out how to get completely rid of them.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Fri, 17 Feb 2023 13:58:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41155#p41155</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41151#p41151</link>
			<description><![CDATA[<p>You seem to be replacing the content each time you &#039;cp&#039; to the file &#039;b&#039;.</p><div class="quotebox"><blockquote><div><p>cp a/*.xx b;cp a/*.yy b;cp a.zz b;cp part*.txt b</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (Camtaf)]]></author>
			<pubDate>Fri, 17 Feb 2023 09:57:30 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41151#p41151</guid>
		</item>
		<item>
			<title><![CDATA[Re: sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41150#p41150</link>
			<description><![CDATA[<p>Are those the actual commands?<br />Are the files in <span class="bbc">a/a</span>the same as in <span class="bbc">a/</span>?<br />Or have you transcribed into some notional commands to illustrate what you wanted to do?<br />(or actually a near miss thereof)</p><p>I don&#039;t think any of your options applies, since it very likely is just a user error.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 17 Feb 2023 05:57:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41150#p41150</guid>
		</item>
		<item>
			<title><![CDATA[sha512sum...]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41145#p41145</link>
			<description><![CDATA[<p>When i do this:</p><div class="codebox"><pre><code>cp a/*.xx b
cp a/*.yy b
cp a/*.zz b
cd b
sha512sum ./* &gt; sums.txt
sha512sum -c sums.txt</code></pre></div><p>i get OK&#039;s from all of the files.<br />on the other hand when i do this:</p><div class="codebox"><pre><code>cd a
sha512sum ./*.xx &gt; part1.txt
sha512sum ./*.yy &gt;&gt; part1.txt
sha512sum ./*.zz &gt; part2.txt
cp a/*.xx b;cp a/*.yy b;cp a.zz b;cp part*.txt b
cd b
mv part1.txt sums.txt
cat part2.txt &gt;&gt; sums.txt
sha512sum -c sums.txt</code></pre></div><p>i get complaints from lines containing .yy and .zz files.<br />Have you encountered this kind of behaviour from sha512sum?</p><p>Trying to find out if it&#039;s either:<br />a) you&#039;re not supposed to use sha512sum(and other commands) like that (the second code-block)<br />b) i have found a bug in sha512sum<br />c) there&#039;s something wrong with my current desktop</p><p>i bought the hard drive abt year ago. And did a 24 hour memtest before installing OS. Passed with flying colours.<br /> So i would like to think it is either a) or b) .</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Thu, 16 Feb 2023 22:58:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41145#p41145</guid>
		</item>
	</channel>
</rss>
