Many releases come with a small checksum file, for example name.sfv or name.md5. It lists every file of the release with a short code. cfv compares your files with such a list and tells you which file is missing or damaged. It can also check your files against the .torrent file they came from, and it creates such lists for files you pass on. This guide installs cfv in your home folder, without root access.

Connect over SSH first: SSH how to get connected. Without cfv, single files can be checked with sha256sum and similar commands: Check That a Download Is Complete and Undamaged: Checksums via SSH.


1. Install cfv

cfv is a Python program. These commands put it into its own folder, ~/software/cfv, and make the command cfv available:

python3 -m venv ~/software/cfv
~/software/cfv/bin/pip install cfv
mkdir -p ~/bin
ln -s ~/software/cfv/bin/cfv ~/bin/cfv

If the folder ~/bin did not exist before, log out of SSH and log in again, so that your service finds commands in it. Then check:

cfv --version
cfv 3.2.0

2. Check a Release With Its SFV or MD5 File

Go to the folder of the release and name the checksum file:

cd ~/downloads/Holiday.Photos.2026
cfv -f check.sfv
check.sfv: 2 files, 2 OK.  0.001 seconds, 638006.2K/s

2 files, 2 OK means that all files are complete and undamaged. cfv without -f checks every checksum file it finds in the folder.

When something is wrong, cfv names the file:

photo1.jpg : No such file or directory
photo2.jpg : crc does not match (e1b04727!=06e4ad78)
check.sfv: 2 files, 0 OK, 1 badcrc, 1 not found.  0.001 seconds, 362477.9K/s
  • crc does not match or badcrc: the file is damaged or incomplete. Download it again, or let your torrent client check it with Force recheck; the client then downloads only the damaged parts.
  • No such file or directory or not found: the file is missing, or it has another name than in the list.

3. Check Files Against Their .torrent File

A .torrent file contains checksums of all data of the torrent, so cfv can check a download even without an SFV file. Run it in the folder that contains the folder of the torrent, usually ~/downloads:

cd ~/downloads
cfv -t torrent -f ~/Holiday.Photos.2026.torrent
~/Holiday.Photos.2026.torrent: 3 files, 3 OK.  0.002 seconds, 378908.4K/s

A torrent checks its data in pieces, and a piece can span the end of one file and the start of the next one. A single damaged spot can therefore mark a neighbouring file as damaged too:

Holiday.Photos.2026/extra/photo3.jpg : piece 0 (at 0..100000) crc does not match (3354d2cc…!=922dcd53…)
Holiday.Photos.2026/photo1.jpg : piece 0 (at 0..162144) crc does not match (3354d2cc…!=922dcd53…)
~/Holiday.Photos.2026.torrent: 3 files, 1 OK, 2 badcrc.  0.002 seconds, 366259.3K/s

Where to get the .torrent file of a torrent in your client: Restore Your Torrents After a Reinstall, and Save Their .torrent Files.

4. Create a Checksum File

Before you pass files on, create a list that others can check them with. In the folder of the files:

cfv -C -t sfv -f check.sfv photo1.jpg photo2.jpg
check.sfv: 2 files, 2 OK.  0.001 seconds, 580663.5K/s
  • Other types: -t md5, -t sha1 or -t sha256 instead of -t sfv.
  • All files of the folder and its subfolders in one list: cfv -C -rr -t md5 -f check.md5.

5. Update or Remove cfv

~/software/cfv/bin/pip install -U cfv

updates it. To remove it:

rm -r ~/software/cfv ~/bin/cfv

Good to Know

  • Large folders: cfv reads every file completely, like your torrent client during a recheck. For hundreds of gigabytes, start it in tmux and check one release at a time: tmux: Keep a Command Running After You Close SSH.
  • In scripts: cfv ends with the exit code 0 when everything is OK, and with another number when a file is damaged or missing. -q leaves out the output.
Was this answer helpful? 149 Users Found This Useful (231 Votes)