Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

CRC

Print or check CRC checksums.

Usage

crc [OPTION...] FILE...

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

Options:
  -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 
                         CRC32
  --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.

Setup

Download

wget https://bitbucket.org/panzi/crc/get/tip.tar.bz2 -O crc.tar.bz2
tar xvjf crc.tar.bz2
cd repos*

Or Clone

hg clone https://bitbucket.org/panzi/crc
cd crc

Build and Install

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
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.

Dependencies

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

  • system
  • filesystem
  • program_options

Recent activity

evans80

evans80 began watching panzi/crc

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.