FCIV:File Checksum Integrity Verifier,文件校验和完整性验证。
哈希码可以用来校验下载过程中是否发生丢包,文件是否发生损坏。
FCIV是微软提供的MD5/SHA1创建,校验工具。
下载:https://www.microsoft.com/en-sg/download/confirmation.aspx?id=11533
选择地址解压后就可以使用。
当安装到C盘根目录时,
C:\windows\system32>cd c:\fciv
c:\FCIV>fciv.exe C:\FCIV\ReadMe.txt
//
// File Checksum Integrity Verifier version 2.05.
//
79ac8d043dc8739f661c45cc33fc07ac c:\fciv\readme.txt
//
// File Checksum Integrity Verifier version 2.05.
//
79ac8d043dc8739f661c45cc33fc07ac c:\fciv\readme.txt
c:\FCIV>fciv.exe C:\FCIV\ReadMe.txt -sha1
//
// File Checksum Integrity Verifier version 2.05.
//
//
// File Checksum Integrity Verifier version 2.05.
//
2fe398f1ebced166087362626241b95efeaab407 c:\fciv\readme.txt
//字节流重定向到hash.txt, >> 表示追加到当前目录下的hash.txt
c:\FCIV>fciv.exe C:\FCIV\ReadMe.txt -sha1 >> hash.txt
默认产生md5码
Syntax:
Usage: fciv.exe [Commands] <Options>
Usage: fciv.exe [Commands] <Options>
Commands: ( Default -add )
-add <file | dir> : Compute hash and send to output (default screen).
dir options:
-r : recursive.
-type : ex: -type *.exe.
-exc file: list of directories that should not be computed.
-wp : Without full path name. ( Default store full path)
-bp : base path. The base path is removed from the path name of each entry
-r : recursive.
-type : ex: -type *.exe.
-exc file: list of directories that should not be computed.
-wp : Without full path name. ( Default store full path)
-bp : base path. The base path is removed from the path name of each entry
-list : List entries in the database.
-v : Verify hashes.
: Option: -bp basepath.
: Option: -bp basepath.
-? -h -help : Extended Help.
Options:
-md5 | -sha1 | -both : Specify hashtype, default md5.
-xml db : Specify database format and name.
-md5 | -sha1 | -both : Specify hashtype, default md5.
-xml db : Specify database format and name.
To display the MD5 hash of a file, type fciv.exe filename
Compute hashes:
fciv.exe c:\mydir\myfile.dll
fciv.exe c:\ -r -exc exceptions.txt -sha1 -xml dbsha.xml
fciv.exe c:\mydir -type *.exe
fciv.exe c:\mydir -wp -both -xml db.xml
fciv.exe c:\mydir\myfile.dll
fciv.exe c:\ -r -exc exceptions.txt -sha1 -xml dbsha.xml
fciv.exe c:\mydir -type *.exe
fciv.exe c:\mydir -wp -both -xml db.xml
List hashes stored in database:
fciv.exe -list -sha1 -xml db.xml
fciv.exe -list -sha1 -xml db.xml
Verifications:
fciv.exe -v -sha1 -xml db.xml
fciv.exe -v -bp c:\mydir -sha1 -xml db.xml
fciv.exe -v -sha1 -xml db.xml
fciv.exe -v -bp c:\mydir -sha1 -xml db.xml