开发者

md5hash performance with big files for check copy files in shared folder

My app Windows forms .NET in Windows XP copy files pdfs in shared network folder in a server Windows 2003.

Admin user in Win2003 detects some corrupt files pdfs, in that shared folder.

I want check if a fileis copied right in shared folder

Andre Krijen says me the best way is to create a MD5Hash of original file. When the file is copied, verify the MD5Hash file of the copied one with the original one开发者_运维问答.

I have big pdf files.

apply md5 hash about big file, any performance problem?

If I only check (without generate md5 hash) Length of files (original and copied)?


Install a MD5 checker on each server and make it a local process so you don't have to use bandwidth to recheck the Hash.

you can use MD5sums as a command line option or create your own worker app.


You can check the length of the files to quickly determine if they are different, but an identical length doesn't say that the content of the files is identical.

To really determine if the files are identical or not, you have to compare every single byte in the files. To send the files again just to compare them is of course not practical, but sending the MD5 hash of the file is.

If you want to compare the files you have to read the entire files, there is no way around that. The MD5 hash at least saves you a lot of network traffic.


I think the MD5 checking should be a separate app running on the server so that you application doesn't have to open the copy on the shared folder to check the MD5.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜