hashing issues pasted by elflng on Sun Jul 25 10:48:19 2021
(define (hexencode str) (let loop ((l (reverse (string->list str))) (r "")) (if (null? l) r (let ((n (char->integer (car l)))) (if (< n 16) (loop (cdr l) (string-append "0" (number->string n 16) r)) (loop (cdr l) (string-append (number->string n 16) r))))))) (define md5sum (let ((d (digest-by-name "md5"))) (lambda (f) (hexencode (file-digest d f))))) (define sha1sum (let ((d (digest-by-name "sha1"))) (lambda (f) (hexencode (file-digest d f))))) ; this gives different values for the same file with different names.
demo pasted by elflng on Sun Jul 25 10:59:00 2021
; this is rowid|uuid|path|size|md5sum|sha1sum sqlite> select * from files_1 where path='/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt'; 64157|56d3543f-58c6-43c8-88e8-91d6c4f35811|/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt|17|1ea12aa159076455ad01ff4544076bc9|40d2c534a23655225a3bcdb601c8cfca56161ab9| sqlite> select * from files_5 where path='/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt'; 64131|56d3543f-58c6-43c8-88e8-91d6c4f35811|/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt|17|5f71ccae55bf639253e3d9341342fd91|bcc38c16f9032b3bc3843a6e838c953bdbd93cb8| $: ls -altr /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt -rw-r--r-- 1 root root 17 Jul 25 00:00 /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt -rw-r--r-- 1 root root 17 Jul 25 00:01 /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt $: md5sum /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt db8f2aec3adc2bffdd2f7eee944de093 /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt db8f2aec3adc2bffdd2f7eee944de093 /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt $: sha1sum /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt 711e22c8863f290eca0747713ab5af3c3d395f8f /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt 711e22c8863f290eca0747713ab5af3c3d395f8f /media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt
serious issues added by elflng on Sun Jul 25 11:03:37 2021
#;2> (md5sum "/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25106.txt") "b02421b9dbd5e1512540047538840eaf" #;3> (md5sum "/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt") "01fad7b5df269f1fa59e3b08254a59c6" #;4> (md5sum "/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt") "0d7a4b292e5f5cbc7be5f6fafb91f369" #;5> (md5sum "/media/datastore/backups/elf/56d3543f-58c6-43c8-88e8-91d6c4f35811/media/elf/39fe7ecd-0c69-4757-bd06-11399b206ba4/1e96187e-bad9-493e-b623-cee4f1e7a157/320b/sde4/sacorpus/spam/2006/09/1157490909.32498_25104.txt") "a0fa799c1573d47017ceb05494175e2d"