Checksum values are useful for checking if files are correctly downloaded or if these files have been changed.
Different checksum values mean that the files are different. The same checksum values mean that the files are the same.
Checking large files or important files can be made easy.
# list the sha512sum value of a file called file.txt
$ sha512sum file.txt
# list the md5sum value of a file called file.txt
$ md5sum file.txt
# list all sha512sum values of all files in the current directory
$ find . -type f | xargs sha512sum
# list all sha512sum values of all files in the current directory
# and keep these values in a file called sha512sum.txt
$ find . -type f | xargs sha512sum > sha512sum.txt
# list all md5sum values of all files in the current directory
$ find . -type f | xargs md5sum
# list all md5sum values of all files in the current directory
# and keep these values in a file called md5sum.txt
$ find . -type f | xargs md5sum > md5sum.txt
# Sources:
# Checksum
## http://en.wikipedia.org/wiki/Checksum
# Bash go through list of dirs and generate md5
## http://stackoverflow.com/questions/6807462/bash-go-through-list-of-dirs-and-generate-md5
# send text to file bash
## http://www.linuxquestions.org/questions/linux-general-1/send-text-to-file-bash-248539/
No comments:
Post a Comment