Print or check CRC checksums.


crc [OPTION...] FILE...

With no FILE, or when FILE is -, read standard input.

  -b [ --binary ]        read in binary mode
  -c [ --check ]         read CRC sums from the FILEs and check them
  -t [ --text ]          read in text mode (default)
  -a [ --algorithm ] arg CRC algorithm to use. can be: CRC16, CCIT, XMODEM or 
  --quiet                don't print OK for each successfully verified file
  --status               don't output anything, status code shows success
  -w [ --warn ]          warn about improperly formatted checksum lines
  -h [ --help ]          display this help and exit
  -v [ --version ]       output version information and exit

Note: There is no difference between binary and text mode option on GNU system.

The options --quiet, --status and --warn are useful only when verifying checksums.

The sums are computed using Boosts CRC library.  When checking, the input
should be a former output of this program.  The default mode is to print
a line with checksum, a character indicating type (`*' for binary, ` ' for
text), and name for each FILE.



wget -O crc.tar.bz2
tar xvjf crc.tar.bz2
cd repos*

Or Clone

hg clone
cd crc

Build and Install

mkdir build
cd build
make -j2 && sudo make install

This will install a binary called crc to ${CMAKE_INSTALL_PREFIX}/bin and create the following symlinks in the same directory:

  • crc16 -> crc
  • crc32 -> crc
  • ccit -> crc
  • xmodem -> crc

When using this program through one of these symlinks the --algorithm option is optional. The algortihm to use is then derived from the symlink name.


This project uses following components of the Boost C++ library:

  • system
  • filesystem
  • program_options