sum

Calculate the checksum and display block number of the file

Supplementary instructions

sum command is used to calculate and display the checksum of the specified file and the number of disk blocks occupied by the file.

grammar

sum(option)(parameter)

Options

-r: Use BSD’s checksum algorithm with a block size of 1k;
-s: Use system V's checksum algorithm with a block size of 512 bytes.

Parameters

File list: The file list that needs to be calculated and the number of disk blocks.

Example

Calculate file checksum:

[root@localhost ~]# sum insert.sql
00827 12