Re: snapshots stuck

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
2009/3/26 James K. Lowden <[email protected]>:
> Craig A. Berry wrote:
>> On md5 and snapshots and James's snapshot script, it looks like the
>> script calculates the md5 on a directory:
>>
>>       /usr/bin/md5 $(WORKDIR) > $@
>>
>> When I try that, I get:
>>
>> % md5 freetds
>> md5: freetds: Is a directory
>>
>> So where I live, you can't do the md5 of a directory.  Where James
>> lives, you can, but what does it mean?  One of the things it might
>> mean is that on James's system the md5 is doing its magic on the
>> directory file itself, not the contents of the directory.
>
> Bingo!
>
> $ mkdir d
> $ md5 d
> MD5 (d) = 45dceb078703c7df15a46c65ee86f702
> $ touch d/t
> $ md5 d
> MD5 (d) = 945ddd2c59b0fdb0421df0fe823ba177
> $ ls > d/t
> $ md5 d
> MD5 (d) = 945ddd2c59b0fdb0421df0fe823ba177
>
> Craig, thanks a heap!  You can add this to your list of contributions to
> the FreeTDS project.  All this time I've been wondering what was wrong.
> The *assumption* that MD5 worked on the tree, I never questioned.  Argh!
>
> The way home is now short.  I think "find freetds -ls" | md5 will work
> fine.  Or, for that matter, "md5 freetds/ChangeLog".
>

I'd use a

(find -type f |sort|xargs md5sum)|md5sum

so only content is considered. find -ls print i-node, user, time and
other informations which are subject to change

freddy77
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.