md5 - How to verify local directory and remote directory in python?
巴扎黑
巴扎黑 2017-05-27 17:39:50
0
2
661

The current situation is like this. In the background of python web, the local directory is transferred to the remote server, but how to verify that the transfer is correct? Are the directories before and after the transfer consistent? Is there any way to verify it?

巴扎黑
巴扎黑

reply all (2)
迷茫

You can package the local directory, calculate the sha1 value of the package, and then name the package with sha1. After uploading to the remote server, verify the sha1 value and decompress it.

    世界只因有你

    You can use md5 to calculate a value for the local directories that need to be uploaded, and then put their md5 results together and calculate again. Use the same operation on the server side to calculate again. If the two md5 results are consistent, it is consistent

    You can also do it without gathering. Make a transfer list, then add the md5 of the corresponding file, and then calculate the md5 with the server based on the transfer list. If it is consistent, the file is correct. If it is inconsistent, it proves that the file is correct. Maybe it’s wrong

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!