Usage

crc [ -s ] [ -l ] fspec ...
crcchk [ -l ] infile [ outfile ]

The crc program gets the length and calculates the CRC value for each file that matches the given command-line file specification(s). If -s is specified, then crc recursively descends into subdirectories looking for files that match the file specification(s).

The crcchk program reads the input text file to get a list of files. It then calcuates the length and CRC of each file listed. If the input file also contains a length and CRC value for a file, those values are compared against the calculated values for that file. This input file can be created directly from the output of either the crc or crcchk command.

If an output file name is specified to crcchk, then each file listed in the input text file, along with its actual length and CRC, is written to the output file. Later, this output file can be read by the crcchk program to check to see if any of the listed files has changed.

File lengths are displayed in decimal format. CRCs are displayed in hexadecimal format with a leading 0x. Filenames are enclosed within double quotes in case they contain embedded spaces or other puncutation.

If the -l (letter el) flat is specified, crc and crcchk generate 32-bit (long) CRCs that are compatible with those generated by PKZIP and zip. The default is to generate 16-bit CRCs.

The crcchk program only honors the -l flag if an output file is specified. It ignores the -l flag if no output file was specified.

For each matching file, crc writes one line to standard output as follows:

        length  CRC  "filename"