I want to check modification history of some vital files in linux(like nginx.conf). How to record concrete modification of specific files? Modification like when and which lines files are changed.
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
Inspired by @Jonathon's comment, I have created a shell script that monitors all the changes done on a specific file, while keeping all the changes history. the script depends on the inotifywait and git packages being installed.
You can find the script here https://github.com/hisham-hassan/linux-file-monitor