signature for a file ?

Huaiyu Zhu huaiyu at gauss.almadan.ibm.com
Wed Jul 31 14:42:23 EDT 2002


John Hunter <jdhunter at ace.bsd.uchicago.edu> wrote:
>
>You may be interested in the dircmp, which will give you reports on
>which files are in common in dirs A and B, which files are unique to
>A, which are unique to B, and so on...
>
>  http://python.org/doc/current/lib/dircmp-objects.html
>
>This built-in library is (naturally) much more efficient than the
>script I posted because
>
>1) It only computes sums on identical files.  No need to check sums on
>   files that have no other file the same size
>
>2) It computes the sums of identically sized files in blocks and
>   compares the files blockwise.  No need to compute the entire sum if
>   the first 1000 bytes differ.
>
>3) It has a nice OO interface to get lists of common and unique files,
>   and will recurs subdirs upon request.


Thank you very much!

Huaiyu



More information about the Python-list mailing list