zoukankan      html  css  js  c++  java
  • Linux学习笔记之在Linux下查询文件的md5,sha1值

                  众所周知,md5,sha1作为一种算法被广泛采用,尤其是在验证一些软件时尤为重要。
          在Linux上,md5sum和sha1sum是校验文件的重要工具,其使用方式总结如下:
    一:验证md5值
          #md5sum filename
          比如:
                大家比较常用的软件VirtualBox-4.3.0-89960-Win.exe,我们在linux下下达如下命令
          [root@localhost home]# md5sum  VirtualBox-4.3.0-89960-Win.exe
          bd0cbd18d7c817a776f09d141efaa9d9  VirtualBox-4.3.0-89960-Win.exe
          可得出VirtualBox-4.3.0-89960-Win.exe的md5值
    二:验证shal值
           #sha1sum filename(注意是数字1不是字母l)
           比如:
                同是上面的软件,我们在linux下下达
          [root@localhost home]# sha1sum VirtualBox-4.3.0-89960-Win.exe
          5ecaa5d6f1a2e93ab766e5a6ea4ac9cf9a73f244  VirtualBox-4.3.0-89960-Win.exe
                其实,通过实际操作,发现下达
          #shasum filename 也可
          [root@localhost home]# shasum VirtualBox-4.3.0-89960-Win.exe
          5ecaa5d6f1a2e93ab766e5a6ea4ac9cf9a73f244  VirtualBox-4.3.0-89960-Win.exe
          这样就知道VirtualBox-4.3.0-89960-Win.exe的sha1值了。

    注:测试文件从这里下载http://pan.baidu.com/s/1dD9VTRj

  • 相关阅读:
    pip包安装问题
    spyder中让生成的图像单独在窗口中显示
    错误的英语提示翻译 以及经常犯的无错误
    程序结构
    运算符
    js jq计算器
    jQuery筛选选择器
    jQuery获取标签信息
    javascript的getTime函数
    animate动画
  • 原文地址:https://www.cnblogs.com/dafang/p/3567705.html
Copyright © 2011-2022 走看看