Talk:Sha1sum
Appearance
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
I created this page by copying the md5sum page, but changing the information from md5 to sha1. As a result, I may have missed something. --Yilez 08:38, 6 September 2006 (UTC)
Example for Directory Tree
[edit]The examples are good! Would be nice if you could also give an example for hashing a complete directory tree (i.e. folders and files with subfolders and files)! --78.87.74.6 (talk) 18:13, 11 March 2014 (UTC)
- Done --176.92.62.191 (talk) 14:05, 13 March 2014 (UTC)
- It's a bit of a vague and complex example. I think advising the creation of a tar archive (or something of the like) of the directory tree might be a better idea. --216.180.246.195 (talk) 08:24, 13 July 2014 (UTC)
- A not-so-pleasant person (given his blatant tone on his own user page) called User:MXocrossIIB decided to remove those examples. Given that those would be likely removed by puristic mods, I post them here before Wikimedia decides to prune the page history:
- ===Hash file trees===
- sha1sum can only create checksums of one or multiple files inside a folder, but not of a folder tree, i.e. of sub folders, sub-sub folders, etc. and the files they contain. This is possible by using sha1sum in combination with the commands find and xargs (and optionally with sort so that the files are sorted in the checksum file).
- Example 1 - Prints hashes on the screen (replace path/to/folder with the path that you want to hash)
find path/to/folder -type f -print0 | sort -z | xargs -0 sha1sum
- Example 2 - Saves hashes to a file (replace path/to/folder with the path that you want to hash) and filename.sha1 with the output filename that the hashes should be written to)
find path/to/folder -type f -print0 | sort -z | xargs -0 sha1sum > filename.sha1
- RoestVrijStaal (talk) 12:02, 12 October 2014 (UTC)