Команды SFK


    1        2        3        4        5        6        7        8        9        10    

Раздел 5. Search and Compare - Поиск и сравнение
deplist | dupfind | extract | find | hexfind | md5 | md5check | md5gento | ofind | pathfind | reflist | xfind | xfindbin | xhexfind |

Help:   Рус   |   Eng        Refer:   Рус   |   Eng  

Команда: md5check
sfk md5check[=]inputfile [-rel[ativeto] dirname] [-quiet]

   verify a list of md5 checksums.

   options
      -sane    look at the modification date and time of the crc
               list file and of every target file. ignore files
               which are newer than the list. can be used to
               check hard disk files for unexpected changes.
               -sane -quiet does not list the newer files.
      -rel     if dirname is supplied, treat filenames from list
               as being relative to dirname. in this case, run the
               command from dirname's parent directory.
      -quiet   do not print progress output while checking files,
               and do not list kb/sec speed stats.
      -skip=n  do not check all files, perform just spot checking
               by skipping n files after every checked file.

   return codes for batch files
      0   normal execution, all checksums matched.
      1   normal execution, checksum(s) mismatched.
      2   some files were missing, all other checksums matched.
      3   some files were missing, and some checksums mismatched.
    >=9   severe error occurred, e.g. wrong checksum file format.

   no archive file support.
      even with sfk xe, md5check does NOT support reading
      and verification of .zip, .tar.gz etc. archive contents.
      instead (with xe) create another md5 list by md5gento
      and then compare two list files by a text diff tool.

   see also
      sfk md5gento  to create md5 lists.
      sfk md5       create md5 of a single file.
      sfk crccheck  verify crc lists.

   web reference
      http://stahlworks.com/sfk-md5list

   examples
      sfk md5check mydir.md5
         check if files listed in mydir.md5 still have
         the same checksums.

      @rem windows batchfile example
         @echo off
         sfk md5check mysums.txt -quiet >nul 2>nul
         IF ERRORLEVEL 1 GOTO mdfailed
         sfk echo "[green]all ok[def]"
         GOTO mddone
         :mdfailed
         sfk echo "[red]verification failed[def]"
         :mddone