pixelb / fslint

Linux file system lint checker/cleaner
322 stars 72 forks source link

Use md5sum program instad of python md5sum_approx (if md5sum command exist) #97

Open pixelb opened 9 years ago

pixelb commented 9 years ago

Original issue 98 created by pixelb on 2014-11-26T16:55:28.000Z:

What steps will reproduce the problem?

  1. all the time ; is slow compared to command line md5sum

What is the expected output? What do you see instead? The same but more fast.

What version of the product are you using? On what operating system? 2.42-2 (debian)

Please provide any additional information below. The program use python md5sum_approx located in: /usr/share/fslint/fslint/supprt/md5sum_approx it should check if exist /usr/bin/md5sum and use it instead.

also it seen to use sha1sum ; sow it generate md5sum one time (all data need to be read) ; then generate sha1sum (all data need to be read (again)! )

You can use the rhash program and calculate md5 and sha1 in one step! no re-re-read data.

Sorry my bad ingles.

pixelb commented 9 years ago

Comment #1 originally posted by pixelb on 2014-11-26T17:05:01.000Z:

python md5sum calls out to the openssl libs and so may even be faster? Also md5sum approx has an advantage of only checking the start of large files.

Thanks for the rhash tip, I'll have a look at that.

p.s. Newer versions of coreutils will also call out to the openssl libs for faster operation.