Linux command
cfv 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Verify files
cfv
Create an SFV
cfv -C -t sfv -f [checksum.sfv] [path/to/directory/*]
Create an MD5
cfv -C -t md5 -f [checksum.md5] [path/to/files/*]
Create a SHA1
cfv -C -t sha1 -f [checksum.sha1] [path/to/files/*]
Verify and show status
cfv -v [path/to/checksum.sfv]
Recursively verify
cfv -r
Search for misnamed files
cfv -s [path/to/checksum.sfv]
说明
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. 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.
参数
- -C
- Create mode: generate a new checksum file.
- -T
- Test mode (default): verify files against a checksum file.
- -t _type_
- Checksum type: sfv, md5, bsdmd5, sha1, sha256, sha512, csv, csv2, csv4, crc, par, par2, torrent, auto (default, auto-detect).
- -f _file_
- Specify the checksum file to read or write.
- -r
- Recurse into directories. Use -rr to recurse into both files and checksum files.
- -v
- Verbose: print status for every file, not just errors.
- -V
- Disable verbose output (default). Use -VV to also suppress the status line.
- -q
- Quiet mode: suppress all output including error messages. Check exit status only.
- -Q
- Print only status lines, not individual errors.
- -n
- Rename files with bad checksums to filename.bad.
- -N
- Disable renaming (default).
- -m
- Check only for missing files without comparing checksums.
- -s
- Search for misnamed files when a file is not found.
- -S
- Disable search for misnamed files (default).
- -u
- Show unverified files. Use -uu to show unverified files in subdirectories.
- -U
- Do not show unverified files (default).
- -i
- Ignore case when matching filenames.
- -l
- Follow directory symlinks in recursive mode (default).
- -L
- Do not follow directory symlinks in recursive mode.
- -z
- Support gzip-compressed checksum files. Use -zz to force gzip on all checksum files.
- -p _dir_
- Change to directory before processing.
- --strippaths _n_
- Strip leading path components from filenames in test mode.
- --progress _val_
- Control progress bar display: no, auto (default), or yes.
FAQ
What is the cfv command used for?
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. 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.
How do I run a basic cfv example?
Run `cfv` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -C do in cfv?
Create mode: generate a new checksum file.