当前位置: 首页 > news >正文

箱包 东莞网站建设购物网站开发所用技术

箱包 东莞网站建设,购物网站开发所用技术,诸城网站建设的文章,常州做网站设计linux命令之md5sum 1.md5sum介绍 linux命令md5sum是用来计算和校验文件的MD5值。 另外: md5sum是用来校验文件内容,与文件名是否相同无关 md5sum校验文件时,逐位校验,如果文件越大,校验所需时间就越长 2.md5sum用…

linux命令之md5sum

1.md5sum介绍

linux命令md5sum是用来计算和校验文件的MD5值。

另外:

md5sum是用来校验文件内容,与文件名是否相同无关

md5sum校验文件时,逐位校验,如果文件越大,校验所需时间就越长

2.md5sum用法

md5sum [参数] filename

md5sum参数
参数说明
-b以二进制模式读入文件内容
-t以文本模式读入文件内容
-c从指定文件中读取 MD5 校验和,并进行校验
--status不生成[争取/错误]提示信息,通过命令返回值来判断

3.实例

3.1.查看md5sum帮助信息

命令:

md5sum --help

[root@rhel77 ~]# md5sum --help
Usage: md5sum [OPTION]... [FILE]...
Print or check MD5 (128-bit) checksums.
With no FILE, or when FILE is -, read standard input.-b, --binary         read in binary mode-c, --check          read MD5 sums from the FILEs and check them--tag            create a BSD-style checksum-t, --text           read in text mode (default)Note: There is no difference between binary and text mode option on GNU system.The following four options are useful only when verifying checksums:--quiet          don't print OK for each successfully verified file--status         don't output anything, status code shows success--strict         exit non-zero for improperly formatted checksum lines-w, --warn           warn about improperly formatted checksum lines--help     display this help and exit--version  output version information and exitThe sums are computed as described in RFC 1321.  When checking, the input
should be a former output of this program.  The default mode is to print
a line with checksum, a character indicating input mode ('*' for binary,
space for text), and name for each FILE.GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'md5sum invocation'
[root@rhel77 ~]# 

3.2.检查文件md5值

命令:

md5sum -t ztj.txt

OR

md5sum -b ztj.txt

root@rhel77 ~]# md5sum -t ztj.txt
cfc12d1432a7b067566080122b1c4f85  ztj.txt
[root@rhel77 ~]# md5sum -b ztj.txt
cfc12d1432a7b067566080122b1c4f85 *ztj.txt
[root@rhel77 ~]# 

3.3.检查文件md5值,与文件无关

命令:

\cp ztj.txt ztj.txt.bak

md5sum ztj.txt

md5sum ztj.txt.bak 

root@rhel77 ~]# \cp ztj.txt ztj.txt.bak
[root@rhel77 ~]# md5sum ztj.txt
cfc12d1432a7b067566080122b1c4f85  ztj.txt
[root@rhel77 ~]# md5sum ztj.txt.bak 
cfc12d1432a7b067566080122b1c4f85  ztj.txt.bak
[root@rhel77 ~]# 

3.4.从指定文件中读取MD5校验和,并进行校验

命令:

md5sum ztj.txt >> md5sum.txt

md5sum -c md5sum.txt

[root@rhel77 ~]# md5sum ztj.txt >> md5sum.txt
[root@rhel77 ~]# 
[root@rhel77 ~]# md5sum -c md5sum.txt
ztj.txt: OK
[root@rhel77 ~]# 

3.5.从指定文件中读取MD5校验和,并不显示校验信息,以命令返回值来判断

备注:

如果校验一致返回0,不一致返回1

命令:

md5sum -c --status md5sum.txt

echo $?

[root@rhel77 ~]# md5sum -c --status md5sum.txt
[root@rhel77 ~]# echo $?
0
[root@rhel77 ~]# 

OR

命令:

echo 111 >>ztj.txt

md5sum -c --status md5sum.txt

echo $?

[root@rhel77 ~]# echo 111 >>ztj.txt
[root@rhel77 ~]# 
[root@rhel77 ~]# md5sum -c --status md5sum.txt
[root@rhel77 ~]# echo $?
1
[root@rhel77 ~]# 
http://www.yayakq.cn/news/353822/

相关文章:

  • 瑞金网站建设光龙装修公司加盟哪家最好
  • 北京注册网站主机如何做服务器建网站
  • 教育网站建设市场分析计划书平面广告设计主题
  • 网站运营做产品需要哪些知识北京土巴兔全包装修价格表
  • 为什么做街舞网站沧浪手机网站建设方案
  • logo网站设计海南开发公司
  • 阿里云怎么放多个网站网站源码免费分享
  • 知名网站排名二维码 wordpress
  • 查询建设工程施工规范网站东莞常平中学录取分数线2022
  • 浙江网站建设的要求wordpress主题语言包
  • 厦门模板网站建设网页制作与网站建设宝典pdf
  • 外贸网站建设昆明app网站建站系统策划方案
  • 大连公司排名安徽网站建设SEO优化制作设计公司
  • 网站开发类服务器和网站空间
  • 二级域名著名网站惠州专业网站建设
  • sever 2008 网站建设农产品推广方案
  • 小白如何搭建一个网站微擎与wordpress
  • vs2013网站开发代码产品设计毕业作品集
  • 网站开发标准ppt做网站视频教程
  • discuzx转wordpress白城seo
  • 重庆sem网站推广西安官网seo分析
  • 您的网站对百度设置了ip封禁杭州市建设部门网站
  • 烟台网站制作工具台州做微网站
  • 酒店为什么做网站一个人做电商网站难吗
  • 成都平台网站开发公司网站开发兼职成都
  • 外贸营销网站制作公司做设计兼职的网站有哪些工作
  • 可以做思维导图的网站wordpress 作者列表
  • 大同营销型网站建设费用杭州程序员培训班
  • php个人网站简洁网站背景修改
  • 网站建设简介联系方式加拿大网站后缀