The use of MD5SUM

Source: Internet
Author: User
Article Title: The use of MD5SUM. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In LINUX, configuration file parameters often change, but you don't know what changes are made, such as LINTENER and TNSNAMES. Using MD5SUM can easily achieve this, let's look at Example 1. create two new files, then use the calculation MD5SUM [root @ rhel6 test] # touch file1 [root @ rhel6 test] # touch file2 [root @ rhel6 test] # ls-l total 0-rw-r -- r --. 1 root 0 Sep 23 08:16 file1-rw-r --. 1 root 0 Sep 23 08:16 file2 [root @ rhel6 test] #2, write data into FILE1 and FILE2 respectively dd if =/dev/urandom of = file2 bs = 1024 count = 1 dd if =/dev/urandom of = file1 bs = 1024 count = 1 3, calculate the MD5 values of the two files and save them to a file [root @ rhel6 test] # md5sum file1 file2> test 4. before changing the values, we can use MD5SUM to check the values, whether the file has changed [root @ rhel6 test] # md5sum -- check test file1: OK file2: OK indicates that the two files are the same as when we calculated the MD5 value, without any changes, use VI to change some data in the FILE, and then compare it. [root @ rhel6 test] # vi fi Le1 [root @ rhel6 test] # md5sum -- check test file1: FAILED file2: OK md5sum: WARNING: 1 of 2 computed checksums did NOT match this indicates that the data in FILE1 is different from the previous data. You can see that the file has changed.

Conclusion: This method can be used to check whether some configuration files have been modified. Perform further investigation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.