Learn a Linux command every day (31): md5sum

Brother of migrant workers 2021-02-23 18:21:24
learn linux command day md5sum


Command profile

md5sum For calculating and verifying files MD5 value .

md5sum It is often used to verify the integrity of network file transmission , Prevent documents from being tampered with . In daily work , We can use it to monitor whether important files in the system have been tampered with .

You can also use md5sum Generate the password of the file or user .

Grammar format

md5sum [ Options ] [ file ]

Option description

-b # Use binary mode to read files
-t # Think of the input file as a text file
-c # Read... From the specified file MD5 Check value , And check it
--status # When the verification is successful, no information will be output
-w # When the verification is not correct, the warning message will be output

Application, for example,

Generate passwords or random numbers

[root@centos7 ~]# date | md5sum
1b1f0ba711e7d4931c23fbbd2b328e40 -

Check a file for md5 value

[root@centos7 testdir]# md5sum mingongge1.txt
c5cab5a45a72380ce456a4370bf40348 mingongge1.txt

Check whether a file has been changed

# Extract original file md5 value
[root@centos7 testdir]# md5sum mingongge1.txt >./mingongge.txt.md5
[root@centos7 testdir]# cat mingongge.txt.md5
c5cab5a45a72380ce456a4370bf40348 mingongge1.txt
# Write content
[root@centos7 testdir]# cat >> mingongge1.txt << EOF
> 1
> 2
> 3
> 4
> EOF
[root@centos7 testdir]# md5sum mingongge1.txt -c mingongge.txt.md5
mingongge1.txt: FAILED
md5sum: WARNING: 1 computed checksum did NOT match

This article is from WeChat official account. - The road of technology for migrant workers (jishuroad) , author : Click to follow ????

The source and reprint of the original text are detailed in the text , If there is any infringement , Please contact the yunjia_community@tencent.com Delete .

Original publication time : 2021-01-28

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .

版权声明
本文为[Brother of migrant workers]所创,转载请带上原文链接,感谢
https://javamana.com/2021/02/20210223181920962z.html

  1. JAVA的函数式接口
  2. JAVA里的元祖类
  3. JQuery Gantt package to create a new ASP.NET project
  4. Binary conversion of Unicode code (Java)
  5. The functional interface of Java
  6. Yuanzu class in Java
  7. Java中的CPU占用高和内存占用高的问题排查
  8. HashMap连环问你能答出几道?
  9. IntelliJ IDEA 还能画思维导图,果然最强 IDE!
  10. java中的反射和代理
  11. Troubleshooting of high CPU and memory usage in Java
  12. How many questions can you answer?
  13. IntelliJ idea can also draw mind maps. It's really the strongest ide!
  14. Reflection and proxy in Java
  15. Java中的CPU占用高和内存占用高的问题排查
  16. Linux OOM(out of memory)
  17. mysql 自定义函数因参数名称报错
  18. Troubleshooting of high CPU and memory usage in Java
  19. Linux OOM(out of memory)
  20. MySQL user defined function error due to parameter name
  21. echarts-gl 3D 地图柱状图可视化GDP
  22. Visualization of histogram of ecarts GL 3D map
  23. 金三银四如何应对Redis面试,一文深入Redis实战实践!
  24. 阿里资深架构师定制金三银四面试整理出来的一份Java核心知识点.pdf
  25. 为什么Java开发工程师工资高,却很多人想转行?
  26. How to deal with the interview of redis!
  27. Ali senior architect customizes a Java core knowledge point sorted out in the interview of golden, silver and four.pdf
  28. Why do java development engineers have high salaries, but many people want to change careers?
  29. 用注解开发SpringMVC
  30. Developing spring MVC with annotations
  31. 编译redis报错/deps/hiredis/libhiredis.a解决
  32. Compile redis report error / DEPs / hirredis / libhirredis. A solution
  33. 用注解开发SpringMVC
  34. Developing spring MVC with annotations
  35. Spring学习笔记-01
  36. Centos安装和卸载docker
  37. Spring learning notes-01
  38. Installing and uninstalling docker in CentOS
  39. Java基础-异常
  40. Java基础-反射
  41. Java基础-继承
  42. k8s部署 (进行中)
  43. Hive-常见调优方式 && 两个面试sql
  44. 死磕Spring之IoC篇 - BeanDefinition 的加载阶段(XML 文件)
  45. Java basics exception
  46. Java Basics - Reflection
  47. Java Basics - inheritance
  48. K8s deployment (in progress)
  49. Hive common tuning methods & two interview SQL
  50. The loading phase of beandefinition (XML file)
  51. 死磕Spring之IoC篇 - BeanDefinition 的加载阶段(XML 文件)
  52. Hive-常见调优方式 && 两个面试sql
  53. The loading phase of beandefinition (XML file)
  54. Hive common tuning methods & two interview SQL
  55. iconv文件编码转换由windows文件放到linux下
  56. The code conversion of iconv file is put into Linux by windows file
  57. SpringBoot2+intellij IDEA开发前环境准备
  58. Preparation of pre development environment for springboot2 + IntelliJ idea
  59. Docker私有仓库部署
  60. Docker private warehouse deployment