Quote:
Originally Posted by catkin
Regards "tweak the machine manually and write down what changes were made", one way is to back up every file before changing it with a rare extension, for example .org (short for original). When the tweaking is complete you can use find to do a context diff on all the .org files and store the output somewhere safe
If a restore is required the context diffs can be used to replicate all the changes.
|
Just wanted to say good point. The way I would do it would always be to create the backup file automatically with each file using the -i.bak option with sed as I would use sed for pretty much all my backups or at least I would use it first before I piped it into grep or awk.
Now that I would have a backup of all the files I created, I would want to know all the files I edited and have at least that information stored somewhere. So I would run a find command only on the files that have been modified in the last n minutes. Usually the post script section should take a couple minutes max so I could run a command to check for the files in /etc edited in the last 10 minutes or so and then send those files to the root directory of that machine for example or maybe to a remote machine, whatever I may desire...
Code:
find /etc/* -mmin -10 -exec cp {} /root/etc \;
But the diff you mentioned can work great to see the actual changes of the files which can be very useful. thanks for that note.