Command of the Day

From my Fedora Rawhide feed, cfv, a nifty md5/sha1/a_host_of_others checksum validator and generator. cfv can recurse directories, generating or validating checksums at will.

There are so manny command line options that I’m having difficulty absorbing it all right now. Look at this:
[knelson@gypsy ~]$ cfv –help
cfv v1.18.2 - Copyright (C) 2000-2008 Matthew Mueller - GPL license
Usage: cfv [opts] [-p dir] [-T|-C] [-t type] [-f file] [files...]
-r recursive mode 1 (make seperate chksum files for each dir)
-rr recursive mode 2 (make a single file with deep listing in it)
-R not recursive (default)
-l follow symlinks (default)
-L don’t follow symlinks
-T test mode (default)
-C create mode
-t <t> set type to <t> (bsdmd5, crc, csv, csv2, csv4, md5, par, par2, sfv, sfvmd5, sha1, torrent, or auto(default))
-f <f> use <f> as list file
-m check only for missing files (don’t compare checksums)
-M check checksums (default)
-n rename bad files
-N don’t rename bad files (default)
-s search for correct file
-S don’t search for correct file (default)
-p <d> change to directory <d> before doing anything
-i ignore case
-I don’t ignore case (default)
-u show unverified files
-U don’t show unverified files (default)
-v verbose
-V not verbose (default)
-VV don’t print status line at end either
-q quiet mode. check exit code for success.
-Q mostly quiet mode. only prints status lines.
-zz force making gzipped files, even if not ending in .gz
-z make gzipped files in auto create mode
-Z don’t create gzipped files automatically. (default)
-ZZ never use gzip, even if file ends in .gz
–list=<l> raw list files of type <l> (notfound, bad, ok, unverified)
–list0=<l> same as list, but seperate files with nulls (useful for xargs -0)
–unquote=VAL handle checksum files with quoted filenames (yes or no(default))
–fixpaths=<s> replace any chars in <s> with /
–strippaths=VAL strip leading components from file names.
–showpaths=<p> show full paths (none/auto/yes-absolute/relative)
–renameformat=<f> format string to use with -n option
–progress=VAL show progress meter (yes, no, or auto(default))
–help/-h show help
–version show cfv and module versions
torrent creation options:
–announceurl=URL tracker announce url
–piece_size_pow2=N power of two to set the piece size to (default 18)
–private_torrent set private flag in torrent

The manpage details these options in good detail; you can even define a ~/.cfvrc file to automatically supply your favorite options.

cfv just found a place in my toolbox. No good workman without good tools, etc.

-k-

3 Comments

  1. Posted August 4, 2008 at 5:38 pm | Permalink

    Egads! I have crafted my own shell scripts with find and xargs to do many of the same tasks. They may not run as fast as cfv (assuming cfv is written in C,) but require less memorizing to use. :-)

  2. ken
    Posted August 4, 2008 at 7:43 pm | Permalink

    cfv is python-powered, as is nearly all of Fedora. Maybe Fedora 10 will feature py-kernel; make it a clean sweep :)
    -k-

  3. Posted August 6, 2008 at 4:54 pm | Permalink

    Yeah, there’s a lot of python utilities in Fedora. I don’t mind it, it’s cool having the source BE the executable, as you can get under the hood right away if you want to or need to.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*