The files we download on the network or copied in the U disk are the same as the source files, but sometimes in case of download or copy error, we will It is found to be different from the source file, which is mainly reflected in the different hash values of SHA1 and MD5. Both SHA1 and MD5 are important indicators for uniquely determining a file. Only SHA1 or MD5 values are consistent to ensure that the downloaded file is correct. So, how do you verify SHA1 and MD5 on a Linux system? In fact, under
linux mostly built md5sum and sha1sum, maybe commands are twins, command format is basically exactly the same, we sha1sum example to explain:
most Simple usage: sha1sum [file path], which displays the SHA1 value of the specified file, such as sha1sum /home/Tianzi/xubuntu14.04.1.iso, the output is divided into two parts, the first part is the sha1 value of this file, and the second is the file path. name.
Method for verifying multiple files at the same time: sha1sum [file1] [file 2] [file 3]. . . For example, the output format such as sha1sum /home/Tianzi/xubuntu14.04.1.iso /home/tianzi/xubuntu13.10.iso is a branch, and each line corresponds to a file, which is the same as a single check
The verification result is stored in a text file: sha1sum [file 1] [file 2] "> [text file], for example:
sha1sum /home/Tianzi/xubuntu14.04.1.iso /home/tianzi/xubuntu13.10 .iso 》 /home/tianzi/sha1.txt (rebuild if the text file already exists, it will be re-created)
The verification result will continue to be written to the existing text file: sha1sum [file1] [file 2] 》》[Text file], for example:
sha1sum /home/Tianzi/xubuntu14.04.1.iso /home/tianzi/xubuntu13.10.iso 》 /home/tianzi/sha1.txt (if text file Already exists to continue writing after the text, will not overwrite the source file)
Read the information from the file to confirm the verification result: This process is more complicated, the command is simple sha1sum --check [text file], text file The content format is as follows:
SHA1 value file 1 way
SHA1 value file 2 path
The content of the command is compared according to the path of each file in the text file and the corresponding input sha1 value, if the sha1 value recorded in the text file and the sha1 of the file Consistent, then return OK, otherwise the prompt file does not match.
The above is the way to verify SHA1 and MD5 in Linux system. Users can check the integrity of the file by referring to the method described above.
Ubuntu system operation, Chromium is a browser developed by Google, if you do not have Flash install
Some Linux users find that their SSH server has experienced 1 errors during the transfer when using
Mirroring is often very large in Linux, but using Docker images is an exception. Wi
To create an RPM package on a Linux system, create a shell script and a readme file
Linux method for copying files/folders using CP commands
Parameters and function descriptions of the Linux system Xconfigurator command
How to install Cacti tools in Gentoo system
How to use the expr command in Linux system
Detailed examples of Linux dynamic library generation
What should I do if Unix cannot find the apue.h file?
Ubuntu can't connect to Windows Phone solution
Steps to install GitLab on CentOS system
Linux system Vsftpd server virtual user and passive mode configuration method
What should I do if the Linux crontab has a BAD FILE MODE error?
Functional questions and answers for Windows 7 taskbar icons
How to cancel Tencent Weibo? Tencent Weibo Logout Tutorial
Baidu Win10 through train compatibility is not normal how to do
Win10 quick start method win10 how to start fast start
The use of Windows system "safe mode"
Win10 crashes when a new folder is created
Using XFS file system in Linux environment
Win8 Highlights Application: Photo of Private Photo Protection Album