I&#39;ve wrote a very functional script for you here:<br><a href="http://gist.github.com/330096">http://gist.github.com/330096</a><br><br>I still feel that, David A. De Graaf and others have noted, your needs still aren&#39;t completely clear. So, instead of continuing to try to get solid specification out of you, I figured I give you something to try out and then you would likely realize what needs to be changed. I broke it down and documented it so you can modify it to meet your needs. But please give it a try. It&#39;s got a built in demo that generates its own test data. All you have to do is use it as described below and give me feedback.<br>
<br>You can see it in action by copying and pasting this in your shell:<br>wget <a href="http://gist.github.com/raw/330096/0ca31670b30d344515bb39fae2f9c75b59c18392/compare_script.sh">http://gist.github.com/raw/330096/0ca31670b30d344515bb39fae2f9c75b59c18392/compare_script.sh</a><br>
chmod +x compare_script.sh<br>awk &#39;/BEGIN UNIT TEST/{p=1};p==1{print}&#39; compare_script.sh | bash<br><br>This is the output you would see:<br>~$ wget <a href="http://gist.github.com/raw/330096/0ca31670b30d344515bb39fae2f9c75b59c18392/compare_script.sh">http://gist.github.com/raw/330096/0ca31670b30d344515bb39fae2f9c75b59c18392/compare_script.sh</a><br>
--2010-03-12 02:05:49--  <a href="http://gist.github.com/raw/330096/0ca31670b30d344515bb39fae2f9c75b59c18392/compare_script.sh">http://gist.github.com/raw/330096/0ca31670b30d344515bb39fae2f9c75b59c18392/compare_script.sh</a><br>
Resolving gist.github.com... 207.97.227.243<br>Connecting to <a href="http://gist.github.com">gist.github.com</a>|207.97.227.243|:80... connected.<br>HTTP request sent, awaiting response... 200 OK<br>Length: 3273 (3.2K) [text/plain]<br>
Saving to: `compare_script.sh&#39;<br>   <br>100%[===========================================================================================================&gt;] 3,273       --.-K/s   in 0.03s<br>   <br>2010-03-12 02:05:50 (115 KB/s) - `compare_script.sh&#39; saved [3273/3273]<br>
   <br>~$ chmod +x compare_script.sh<br>~$ awk &#39;/BEGIN UNIT TEST/{p=1};p==1{print}&#39; compare_script.sh | bash<br>Creating client directories in /tmp/ for testing...<br>Removing /tmp/client01 /tmp/client02 /tmp/client03 /tmp/client04 /tmp/client05 /tmp/client06 /tmp/client07 /tmp/client08 /tmp/client09 /tmp/client10<br>
Create a dir structure to prove that it works on deep dirs<br>Create 10 files in each dir<br>Copy the images dir over to a movies dir<br>Remove a file from each of the images dirs<br>Remove a different file from each of the movies dirs<br>
Put some alternate data in to create non-matching filesizes<br>Create 10 /tmp/clients (they&#39;ll all be the same, but you get the point)<br>Run the script on all client directories<br><br><br>/tmp/client01/images/landscape/asset03.ext<br>
/tmp/client01/images/landscape/asset04.ext<br>/tmp/client01/images/landscape/asset06.ext<br>/tmp/client01/images/landscape/file03.ext<br>/tmp/client01/images/landscape/file04.ext<br>/tmp/client01/images/landscape/file06.ext<br>
/tmp/client01/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client01/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client01/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client02/images/landscape/asset03.ext<br>
/tmp/client02/images/landscape/asset04.ext<br>/tmp/client02/images/landscape/asset06.ext<br>/tmp/client02/images/landscape/file03.ext<br>/tmp/client02/images/landscape/file04.ext<br>/tmp/client02/images/landscape/file06.ext<br>
/tmp/client02/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client02/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client02/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client03/images/landscape/asset03.ext<br>
/tmp/client03/images/landscape/asset04.ext<br>/tmp/client03/images/landscape/asset06.ext<br>/tmp/client03/images/landscape/file03.ext<br>/tmp/client03/images/landscape/file04.ext<br>/tmp/client03/images/landscape/file06.ext<br>
/tmp/client03/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client03/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client03/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client04/images/landscape/asset03.ext<br>
/tmp/client04/images/landscape/asset04.ext<br>/tmp/client04/images/landscape/asset06.ext<br>/tmp/client04/images/landscape/file03.ext<br>/tmp/client04/images/landscape/file04.ext<br>/tmp/client04/images/landscape/file06.ext<br>
/tmp/client04/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client04/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client04/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client05/images/landscape/asset03.ext<br>
/tmp/client05/images/landscape/asset04.ext<br>/tmp/client05/images/landscape/asset06.ext<br>/tmp/client05/images/landscape/file03.ext<br>/tmp/client05/images/landscape/file04.ext<br>/tmp/client05/images/landscape/file06.ext<br>
/tmp/client05/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client05/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client05/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client06/images/landscape/asset03.ext<br>
/tmp/client06/images/landscape/asset04.ext<br>/tmp/client06/images/landscape/asset06.ext<br>/tmp/client06/images/landscape/file03.ext<br>/tmp/client06/images/landscape/file04.ext<br>/tmp/client06/images/landscape/file06.ext<br>
/tmp/client06/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client06/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client06/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client07/images/landscape/asset03.ext<br>
/tmp/client07/images/landscape/asset04.ext<br>/tmp/client07/images/landscape/asset06.ext<br>/tmp/client07/images/landscape/file03.ext<br>/tmp/client07/images/landscape/file04.ext<br>/tmp/client07/images/landscape/file06.ext<br>
/tmp/client07/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client07/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client07/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client08/images/landscape/asset03.ext<br>
/tmp/client08/images/landscape/asset04.ext<br>/tmp/client08/images/landscape/asset06.ext<br>/tmp/client08/images/landscape/file03.ext<br>/tmp/client08/images/landscape/file04.ext<br>/tmp/client08/images/landscape/file06.ext<br>
/tmp/client08/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client08/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client08/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client09/images/landscape/asset03.ext<br>
/tmp/client09/images/landscape/asset04.ext<br>/tmp/client09/images/landscape/asset06.ext<br>/tmp/client09/images/landscape/file03.ext<br>/tmp/client09/images/landscape/file04.ext<br>/tmp/client09/images/landscape/file06.ext<br>
/tmp/client09/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client09/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client09/images/landscape/thumbnails/thumbnail06.ext<br>/tmp/client10/images/landscape/asset03.ext<br>
/tmp/client10/images/landscape/asset04.ext<br>/tmp/client10/images/landscape/asset06.ext<br>/tmp/client10/images/landscape/file03.ext<br>/tmp/client10/images/landscape/file04.ext<br>/tmp/client10/images/landscape/file06.ext<br>
/tmp/client10/images/landscape/thumbnails/thumbnail03.ext<br>/tmp/client10/images/landscape/thumbnails/thumbnail04.ext<br>/tmp/client10/images/landscape/thumbnails/thumbnail06.ext<br><br>On Thu, Mar 11, 2010 at 1:22 PM, Lightner, Jeff &lt;<a href="mailto:jlightner@water.com">jlightner@water.com</a>&gt; wrote:<br>
&gt; Part of the issue may be the asynchronous way replies hit the list.<br>&gt;<br>&gt; By the time one&#39;s post hits the list its contents may have been obviated by other posts that weren&#39;t there at the time it was submitted.  The OP wasn&#39;t clear in whether he was looking for differences between multiple clients or just within the subdirectories of each client so some of the posts addressed what they thought he was asking.<br>
&gt;<br>&gt; The OP clarified what he was asking and what I wrote would do what he asked  based on my testing.  I haven&#39;t tested the other solutions so they may be better or worse than mine.<br>&gt;<br>&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a> [mailto:<a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a>] On Behalf Of Richard Bronosky<br>&gt; Sent: Thursday, March 11, 2010 12:44 PM<br>
&gt; To: Atlanta Linux Enthusiasts - Yes! We run Linux!<br>&gt; Subject: Re: [ale] Stumped-<br>&gt;<br>&gt; The multiple clients thing is extraneous info and I wish we could all<br>&gt; forget it. It&#39;s like describing what you had for breakfast in the<br>
&gt; middle of your task explanation. They would eat you up for this line<br>&gt; of questioning on irc://<a href="http://irc.freenode.net/#bash">irc.freenode.net/#bash</a> (which is a GREAT<br>&gt; resource!) I think this explains it pretty well:<br>
&gt; [12:39pm] RichardBronosky: !b1<br>&gt; [12:39pm] greybot: bashphorism 1: the questioner&#39;s first description<br>&gt; of the problem/question will be misleading.<br>&gt;<br>&gt; On Thu, Mar 11, 2010 at 12:32 PM, Geoffrey &lt;<a href="mailto:lists@serioustechnology.com">lists@serioustechnology.com</a>&gt; wrote:<br>
&gt;&gt; Dennis Ruzeski wrote:<br>&gt;&gt;&gt; Just to be clear--<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Per client, I need to find files with the same name but different sizes.<br>&gt;&gt;<br>&gt;&gt; Oops, so you&#39;re not comparing client to client?  My script I sent<br>
&gt;&gt; earlier will still work, you just need to run it from the clients directory.<br>&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; On Thu, Mar 11, 2010 at 10:32 AM, Dave Weiner &lt;<a href="mailto:davew@coyotetechnical.com">davew@coyotetechnical.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; Dennis Ruzeski wrote:<br>&gt;&gt;&gt;&gt;&gt; Same name but different size.<br>&gt;&gt;&gt;&gt; I got that part, but are you comparing files limited to just the client,<br>&gt;&gt;&gt;&gt; or do you have to compare it against the other 9,999 clients?<br>
&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; If it&#39;s contained to just the one client, you can&#39;t have two files with<br>&gt;&gt;&gt;&gt; the same name in the same directory with different sizes.<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; You need to better explain what you are trying to do.<br>
&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Dave<br>&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt; Ale mailing list<br>&gt;&gt;&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>&gt;&gt;&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt;&gt;&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>&gt;&gt;&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Ale mailing list<br>&gt;&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>&gt;&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>&gt;&gt;&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt;&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>&gt;&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; Until later, Geoffrey<br>&gt;&gt;<br>&gt;&gt; &quot;I predict future happiness for America if they can prevent<br>
&gt;&gt; the government from wasting the labors of the people under<br>&gt;&gt; the pretense of taking care of them.&quot;<br>&gt;&gt; - Thomas Jefferson<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Ale mailing list<br>
&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>&gt;&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>
&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; .!# RichardBronosky #!.<br>&gt;<br>&gt; _______________________________________________<br>&gt; Ale mailing list<br>&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>&gt; <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>&gt; Proud partner. Susan G. Komen for the Cure.<br>&gt;<br>&gt; Please consider our environment before printing this e-mail or attachments.<br>&gt; ----------------------------------<br>&gt; CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.<br>
&gt; ----------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Ale mailing list<br>&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>&gt; <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>&gt; <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>&gt;<br><br><br><br>-- <br>.!# RichardBronosky #!.<br><br>