|
| 1 | +# TAGLINE |
| 2 | + |
| 3 | +Versatile checksum file verifier and creator |
| 4 | + |
| 5 | +# TLDR |
| 6 | + |
| 7 | +**Verify files** against a checksum file in the current directory |
| 8 | + |
| 9 | +```cfv``` |
| 10 | + |
| 11 | +**Create an SFV** checksum file for all files in a directory |
| 12 | + |
| 13 | +```cfv -C -t sfv -f [checksum.sfv] [path/to/directory/*]``` |
| 14 | + |
| 15 | +**Create an MD5** checksum file |
| 16 | + |
| 17 | +```cfv -C -t md5 -f [checksum.md5] [path/to/files/*]``` |
| 18 | + |
| 19 | +**Create a SHA1** checksum file |
| 20 | + |
| 21 | +```cfv -C -t sha1 -f [checksum.sha1] [path/to/files/*]``` |
| 22 | + |
| 23 | +**Verify and show status** for each file |
| 24 | + |
| 25 | +```cfv -v [path/to/checksum.sfv]``` |
| 26 | + |
| 27 | +**Recursively verify** all checksum files in subdirectories |
| 28 | + |
| 29 | +```cfv -r``` |
| 30 | + |
| 31 | +**Search for misnamed files** when verification fails |
| 32 | + |
| 33 | +```cfv -s [path/to/checksum.sfv]``` |
| 34 | + |
| 35 | +# SYNOPSIS |
| 36 | + |
| 37 | +**cfv** [**-T**|**-C**] [**-t** _type_] [**-f** _file_] [**-r**|**-rr**] [**-v**|**-V**] [**-n**|**-N**] [**-s**] [**-u**|**-uu**] [_files..._] |
| 38 | + |
| 39 | +# PARAMETERS |
| 40 | + |
| 41 | +**-C** |
| 42 | +> Create mode: generate a new checksum file. |
| 43 | +
|
| 44 | +**-T** |
| 45 | +> Test mode (default): verify files against a checksum file. |
| 46 | +
|
| 47 | +**-t** _type_ |
| 48 | +> Checksum type: **sfv**, **md5**, **bsdmd5**, **sha1**, **sha256**, **sha512**, **csv**, **csv2**, **csv4**, **par**, **par2**, **torrent**. |
| 49 | +
|
| 50 | +**-f** _file_ |
| 51 | +> Specify the checksum file to read or write. |
| 52 | +
|
| 53 | +**-r** |
| 54 | +> Recurse into directories. Use **-rr** to recurse into both files and checksum files. |
| 55 | +
|
| 56 | +**-v** |
| 57 | +> Verbose: print status for every file, not just errors. |
| 58 | +
|
| 59 | +**-V** |
| 60 | +> Disable verbose output. |
| 61 | +
|
| 62 | +**-n** |
| 63 | +> Rename files with bad checksums to filename.bad. |
| 64 | +
|
| 65 | +**-N** |
| 66 | +> Disable renaming. |
| 67 | +
|
| 68 | +**-s** |
| 69 | +> Search for misnamed files when a file is not found. |
| 70 | +
|
| 71 | +**-u** |
| 72 | +> Show unverified files. Use **-uu** to show unverified files in subdirectories. |
| 73 | +
|
| 74 | +**-z** |
| 75 | +> Support gzip-compressed checksum files. Use **-zz** to use gzip on all checksum files. |
| 76 | +
|
| 77 | +**-p** _dir_ |
| 78 | +> Change to directory before processing. |
| 79 | +
|
| 80 | +# DESCRIPTION |
| 81 | + |
| 82 | +**cfv** is a utility for testing and creating checksum verification files. It automatically detects the checksum format when verifying, and supports a wide range of formats including SFV, MD5, SHA1, SHA256, SHA512, CSV, PAR/PAR2, and BitTorrent metainfo files. |
| 83 | + |
| 84 | +In test mode (default), cfv reads a checksum file and verifies that each listed file matches its recorded checksum. In create mode (**-C**), it generates a new checksum file from the specified input files. The tool can search for misnamed files, rename corrupted files, and recursively process directory trees. |
| 85 | + |
| 86 | +# CONFIGURATION |
| 87 | + |
| 88 | +Configuration file at **~/.cfvrc** contains default options (one per line, same syntax as command-line flags). Options on the command line override the config file. |
| 89 | + |
| 90 | +# CAVEATS |
| 91 | + |
| 92 | +PAR and PAR2 formats are supported for verification only, not creation. BitTorrent verification requires the original directory structure. Exit codes are bitwise-ORed: 2 (bad checksum), 4 (size mismatch), 8 (not found), 16 (file error), 32 (unverified), 64 (checksum file error). |
| 93 | + |
| 94 | +# HISTORY |
| 95 | + |
| 96 | +**cfv** was originally written in **Python** as an open-source checksum verification tool. It gained popularity in the file-sharing community for its broad format support, particularly SFV and MD5. The project was later forked as **cfv2** to maintain Python 3 compatibility after the original project became unmaintained. |
| 97 | + |
| 98 | +# SEE ALSO |
| 99 | + |
| 100 | +[md5sum](/man/md5sum)(1), [sha1sum](/man/sha1sum)(1), [sha256sum](/man/sha256sum)(1), [cksum](/man/cksum)(1) |
0 commit comments