<div dir="ltr">Hi Gabor,<br>You can use rsync.<br>rsync -avn a b<br><br>-n is the flag for dry-run.<br>If you add the flag -c then it will compute the checksum for every file. If -c is not used, then it will relay on timestamp and size of file for comparison. <br>
<br>output:<br>$ rsync -avn a b<br>sending incremental file list<br>a/<br>a/file<br><br>sent 74 bytes received 19 bytes 186.00 bytes/sec<br>total size is 23.29K speedup is 250.47 (DRY RUN)<br><br>Investigate the -q option if you want to use this command from a script. <br>
<br>Regards,<br>Kfir<br><br><div class="gmail_quote">On Sat, Sep 4, 2010 at 12:21 PM, Gabor Szabo <span dir="ltr"><<a href="mailto:szabgab@gmail.com">szabgab@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hi,<br>
<br>
I guess there is an obvious command for this, I just don't know it.<br>
<br>
How can I compare two directory structures if the content is the same<br>
*disregarding*<br>
actual file content, or comparing that only if the file names and<br>
sizes are the same?<br>
<br>
As I understand diff -r would do it but it would also compare files<br>
line by line.<br>
<br>
As these are images and movies, I don't want to compare them line by<br>
line or event byte by byte.<br>
As a first approximation I only want to list files that exists in one<br>
directory but not in the other<br>
or when the files have different size.<br>
<br>
Gabor<br>
<br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</blockquote></div><br></div>