Menu

#1 checksum file update functionality

open
None
5
2017-12-12
2002-01-03
Anonymous
No

Hi! I really like your app, and I have found it very
useful. However, there's possibly one part I don't
understand, so I'll explain my scenario, and maybe you
can shed some light on the subject.

My usage of cfv consists of ensuring the contents of
roughly 600 files totaling 160 gigs or thereabouts
don't get corrupted. There is a (at points) deep
directory structure containing all of these files. I
have used cfv to create a single .sfv file for each
directory (-r). This part works great.

My problem happens when a new version of a file needs
to be added to the repository. This (and I can't
change this fact) will have an identical name to the
file it is replacing. So, at this point I am
in /dir/subdir1/ and there is a subdir1.sfv file
containing sfv's for all of the files in subdir1. I
now update one or more of the files in subdir1. What
is the best way to update the checksum's of these
files within subdir1? I can manually generate the
checksum, and then insert it into subdir1.sfv but this
seems cumbersome.

If you don't already have a means to do what I'm
asking implemented, what I was thinking would be
something along the lines of (executed from
within /dir/subdir1):

cfv -C -U example_file.txt

I realize -U is already used for something else, but I
couldn't think of anything else to stand for 'update'
that wasn't already used, so I used it anyway. Sorry.

The way I see this functioning, would be that the -U
parameter would instruct cfv to perform as normal, but
instead of producing the error

subdir1.sfv already exists
1 files, 0 OK, 1 chksum file errors. x seconds, xK/s

it would then find example_file.txt's entry within the
subdir1.sfv file, and change it to the new checksum
calculated from example_file.txt.

Does this seem reasonable to you? I would truly
appreciate this feature, but unfortunately my python
abilities are fairly nonexistent, and I doubt I would
be able to accomplish it myself.

Discussion

  • Matthew Mueller

    Matthew Mueller - 2002-01-06
    • assigned_to: nobody --> donut
     
  • Adam

    Adam - 2017-12-12

    I'm aware that this is 15-year necroposting, but I'd like to add a clarifying point.

    It seems to me that there are two things one might mean when one says "to update checksum files".

    1. When the files themselves have changed. This is similar to what's discussed here in the OP. The only way I see this working is if the timestamp (and filesize) information also be kept (akin to how rsync performs its 'quick' verification) - simply re-checking and replacing the checksums seems to be inviting disaster (defeating the entire point of an integrity tool, potentially overwriting valid checksums when your files merely got corrupted), and specifying individual files manually could get cumbersome, fast.
    2. When files are simply added/removed. This matches my desired use case, where I have a media library where even within one subfolder files are added/removed (mostly added) on a semi-regular basis. My current workflow is to first verify the existing files, then backup the previous checksum file, then generate a fresh one, but that wastes a lot of time. I would expect one flag which simply assumes that old files are fine (unless they've been removed, and removes their checksums) and adds new files to the checksum lists, with an additional flag to enforce the verification of the files which existed before.

    Have I overlooked one of the supported checksum file formats already supporting timestamps/filesizes? (Except for .torrent, since I'd prefer plaintext)

     

Log in to post a comment.