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.