Linux Learning - Checksums

1. 'md5sum'
  a. 'md5sum 1million.txt' - returns string that is unique to its content
  b. 'md5sum 1million.txt2' - returns the same string because the content are identical
  c. Alter content in various files and compare MD5SUMs
Note: A single bit differential will cause the checksum to vary


 2. 'sha1sum'
  a. 'sha1sum 1million.txt'


Note: Backticks are used to support shell-based command-substitution
i.e. 'rpm -qf `which sha1sum`' OR 'rpm -qf $(which sha1sum)'


  b. 'sha1sum 1million* > 1million.txt.sha1sums'
  c. 'sha1sum -c 1million.txt.sha1sums' - confirm SHA1SUMs wholesale


 3. 'sha256sum' - 256-bit
  a. 'sha256sum 1million* > 1million.txt.sha256sums'
  b. 'sha25sum --quiet -c 1million.txt.sha25sums' - quietly checks ALL sums
Note: Returns error if 1 or more fail


 4. 'sha512sum' - 512-bit
  a. 'sha512sum 1million* > 1million.txt.sha512sums'


Note: If file changes during checksum calculation, then its checksum will be incorrect, resulting in confirmation failures

你可能感兴趣的:(Linux/Checksums)