Bitcoin Forum
May 12, 2024, 05:00:35 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: UNIX tools hash vs hashdeep  (Read 466 times)
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


I may write code in exchange for bitcoins.


View Profile
March 04, 2016, 07:03:12 PM
 #1

On Unices that I use, there's md5sum and md5deep and md5:

Code:
$ echo -n "foo" | md5
acbd18db4cc2f85cedef654fccc4a4d8
$ echo -n "foo" | md5sum
acbd18db4cc2f85cedef654fccc4a4d8  -
$ echo -n "foo" | md5deep
acbd18db4cc2f85cedef654fccc4a4d8

For sha, I see sha1sum and sha1deep, sha256sum and sha256deep, etc.

From what I can tell, there's no difference between the output of md5 and md5deep.  And the "sum" versions just adds a " -".  Can anyone let me know what's going on with these variants of these hashing tools?

Thanks in advance!
1715490035
Hero Member
*
Offline Offline

Posts: 1715490035

View Profile Personal Message (Offline)

Ignore
1715490035
Reply with quote  #2

1715490035
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715490035
Hero Member
*
Offline Offline

Posts: 1715490035

View Profile Personal Message (Offline)

Ignore
1715490035
Reply with quote  #2

1715490035
Report to moderator
1715490035
Hero Member
*
Offline Offline

Posts: 1715490035

View Profile Personal Message (Offline)

Ignore
1715490035
Reply with quote  #2

1715490035
Report to moderator
1715490035
Hero Member
*
Offline Offline

Posts: 1715490035

View Profile Personal Message (Offline)

Ignore
1715490035
Reply with quote  #2

1715490035
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
March 04, 2016, 08:21:32 PM
 #2

https://en.wikipedia.org/wiki/Md5deep
Quote
...deep can be invoked in several different ways. Typically users operate it recursively, where md5deep walks through one directory at a time giving digests of each file found, and recursing into any subdirectories within. Its recursive behavior is approximately a depth-first search, which has the benefit of presenting files in lexicographical order. On Unix-like systems, similar functionality can be often obtained by combining find with hashing utilities such as md5sum, sha256sum...

"deep" is a package that uses hashing functions (such as md5 or sha256) and adds additional functionality to apply the hashing function to sets of data (such as files in subdirectories).
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


I may write code in exchange for bitcoins.


View Profile
March 05, 2016, 08:11:07 PM
 #3

Thanks DH.  I guess I didn't turn up that wikipedia article in my searching, all I was finding was the online versions of the man pages.  I did go ahead and try using md5deep on a directory, and it told me:

Code:
$ md5deep ~/public_html/
md5deep: /rc00/d05/vocab/public_html/: Is a directory

I suppose there's some other way to take advantage of that recursiveness.  In any case, I'm only actually hashing strings with these programs at the moment so effectively, I can expect the deep versions to be equivalent to the nondeeps.

Thanks again for pointing me in the right direction.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
March 05, 2016, 10:49:04 PM
 #4

Code:
$ md5deep ~/public_html/
md5deep: /rc00/d05/vocab/public_html/: Is a directory

I think you wanted to try:

Code:
md5deep -r ~/public_html/*
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!