A file checksum is useful when you want to verify the content of a file are same as the content you copied or downloaded somewhere. Basically it calculate and summarise every bits of the file into a small integer value. To verify content of the file are same as the source, simply do a checksum of the source and destination file, and compare the checksum value.
To calculate a MD5 checksum of any file, enter the following command at the Linux prompt:
To calculate a SHA-1 checksum of any file, enter the following command at the Linux prompt: