-
-
Notifications
You must be signed in to change notification settings - Fork 3
crcdiff.1
crc - checksum files
crcdiff - compare two crc lists and report the difference
crc [-dv] [-i initial_crc] file ...
crcdiff [-Cs] [-c critical_list] crclist crclist
For each file, crc calculates and prints a 32-bit CRC in hexadecimal. With the -v optin it additionally prints file permissions, file owner, group and the file name. It is typically used to validate files transferred between different systems, and is useful in detecting subtle disk corruption. crc uses a checksum compatible with the DOS version of crc, the 32 bit CRC used by PKZIP version 0.9. as well as the "crc" command in ZCOMM and Professional-YAM (high reliability communications programs). With the -d option, the 32-bit CRC is printed in decimal. You can use -i option to initialize CRC with initial_crc instead of 0.
The 32-bit CRC used is the frame check sequence in ADCCP (ANSI X3.66, also known as FIPS PUB 71 and FED-STD-1003, the U.S. version of CCITT's X.25 link-level protocol).
crcdiff compares two crc lists and reports the differences. If -c option is used, directories/files listed in critical_list will be used to give L2 warnings for changes to such files. The -C option displays the checksum in the diff.
corrupt - crc changed without date change
replaced - crc + date changed
permiss - permissions changed
own/grp - owner or group changed
deleted -
added - Print the info for the new file
WARNING L1 - Changes to setuid, setgid files
WARNING L2 - Changes to file in critical_list
If crclist files are sorted you can use the -s option which makes crcdiff(1) run faster.
To generate crclist you can use
find / -print | sort | xargs crc -v > crc_file
to generate a crc list. Assume that no files have tabs or spaces in the name.
Altough extremely unlikely, files with different data may still produce the same crc value.
sum(1) md5sum(1) sha1sum sha224sum sha256sum sha284sum sha512sum