User Tools

Site Tools


wiki:software:dfc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:software:dfc [2019/06/12 11:32]
dizwell [License]
wiki:software:dfc [2019/07/11 16:25]
dizwell [4.1 Force Checking]
Line 122: Line 122:
 "​Skipping"​ in this context means that the tool has checked the value of the TAGDATE metadata for your file and has discovered it to be less than 30 days old. Therefore, DFC simply skips further processing for the listed file and moves on to the next; and so on. This saves decoding/​testing files which were checked so recently that it's most unlikely that any of their contents have become corrupted since. "​Skipping"​ in this context means that the tool has checked the value of the TAGDATE metadata for your file and has discovered it to be less than 30 days old. Therefore, DFC simply skips further processing for the listed file and moves on to the next; and so on. This saves decoding/​testing files which were checked so recently that it's most unlikely that any of their contents have become corrupted since.
  
-(If you ever wanted to //force// a re-check, regardless of when it was last done, you can edit line 32 of the shell scriptSet it to a low number (say, 10) and the test will become 'was this file checked less than 10 seconds ago'​... and DFC will probably decide that it does now need re-checking).+(If you ever wanted to //force// a re-check, regardless of when it was last done, see Section 4.1 below).
  
 If you are very unfortunate,​ you may see this sort of output of the DFC tool instead: If you are very unfortunate,​ you may see this sort of output of the DFC tool instead:
Line 168: Line 168:
  
 Note that the log file doesn'​t record details of which files were skipped or that correctly //passed// validation: it **only** lists the details of the files that have failed verification. The log is therefore the '​agenda'​ of things which  need fixing (though how you go about resolving corruption in a FLAC file is beyond the scope of the DFC tool or this page!) Note that the log file doesn'​t record details of which files were skipped or that correctly //passed// validation: it **only** lists the details of the files that have failed verification. The log is therefore the '​agenda'​ of things which  need fixing (though how you go about resolving corruption in a FLAC file is beyond the scope of the DFC tool or this page!)
 +
 +==== 4.1 Force Checking =====
 +By default, as you've seen, you supply two arguments to the dfc script: the directory where your music files are stored and the directory you want the log file written to. By default, too, DFC will only re-check MD5 hashes for files which last had their MD5s checked more than about 30 days ago.
 +
 +Sometimes, though, you will want to force a re-check of audio files no matter how short a time has elapsed since they were last checked. That's why you can also supply a //third// run-time parameter to the dfc script, **--force-recheck**. If that's typed in after the other two parameters, then the MD5 check will take place for any file that was last checked more than 1 second ago (which, in all likelihood, will be all of them!)
 +
 +For example:
 +
 +<​code>​[[email protected] Desktop]$ dfc . .
 +-----------------------------------------------------------------------------
 +          The Dizwell Flac Checker, Copyright © Howard Rogers 2019
 +                             ​Version:​ 1.01
 +-----------------------------------------------------------------------------
 +
 +  Skipping /01 - Rhapsody in Blue.flac... Last analysis done less than 30 days ago!
 +  Validated Files: ​ 0
 +  Skipped Files: ​   1
 +  Files in error: ​  0
 +
 +
 +  All good!
 +
 +=========================================================================================================</​code>​
 +
 +Here you see me invoke dfc with two full-stops (or periods) as the usual two inputs, with a space in between them, so that they are registered as two periods and not one double-period(..):​ in Linux, the period simply means "​here",​ so I'm telling it to check files in my current directory and write the log file to that same current directory, too. My current directory in this case happens to be my home/​Desktop folder. I could equally well have spelled out both directories,​ but happen not to have done so on this occasion.
 +
 +You can see that dfc is happy to run with that sort of input -but that it has spotted that my "​Rhapsody in Blue" file was checked for corruption less than 30 days ago. Therefore, it's shown as being '​Skipped Files: 1'.
 +
 +But if I demand to check this file, I can re-run DFC using this sort of command:
 +
 +  dfc . . --force-check
 +  ​
 +Or perhaps this one:
 +
 +  dfc /​home/​hjr/​Desktop /​home/​hjr/​Logs --force-check
 +  ​
 +That time, I'm spelling out what directory to check and where to write the log-file ...but the important thing (for these purposes!) is that my //third// argument is the "​force-check"​ one. It means this happens:
 +
 +<​code>​[[email protected] Desktop]$ dfc . . --force-check
 +Forcing re-check of files...
 +-----------------------------------------------------------------------------
 +          The Dizwell Flac Checker, Copyright © Howard Rogers 2019
 +                             ​Version:​ 1.01
 +-----------------------------------------------------------------------------
 +
 +  Validating /01 - Rhapsody in Blue.flac...
 +  Validated Files: ​ 1
 +  Skipped Files: ​   0
 +  Files in error: ​  0
 +
 +
 +  All good!
 +
 +=========================================================================================================</​code>​
 +    ​
 +DFC runs as you'd hope -but this time, it's actually bothering to validate the Rhapsody in Blue file. Since it passes the check, the "​Validated Files: 1" indication comes up... note that "​Skipped Files" remains at zero. So, when you use --force-check as the third run-time parameter when invoking the DFC utility, the audio file will be re-validated,​ no matter when it was last validated.
 +
 +Here's one more run, this time using spelled-out directory names, rather than mere full-stops:
 +
 +<​code>​[[email protected] Desktop]$ dfc /​home/​hjr/​Desktop /​home/​hjr/​Logs --force-check
 +Forcing re-check of files...
 +-----------------------------------------------------------------------------
 +          The Dizwell Flac Checker, Copyright © Howard Rogers 2019
 +                             ​Version:​ 1.01
 +-----------------------------------------------------------------------------
 +
 +  Validating /01 - Rhapsody in Blue.flac...
 +  Validated Files: ​ 1
 +  Skipped Files: ​   0
 +  Files in error: ​  0
 +
 +
 +  All good!
 +
 +=========================================================================================================</​code>​
  
 ===== 5.0 Other Matters ===== ===== 5.0 Other Matters =====
wiki/software/dfc.txt · Last modified: 2019/07/11 16:25 by dizwell