Search code examples
linuxloopsdiffconfiguration-files

How to get all changes you made to your config files (since system install) in one shot?


I wonder if there is any way i could retrieve all changes i made to my various configuration files since install(residing in /etc and so on) in one shot?

I imagine some kind of loop, that uses 'diff' to compare all those files to a 'standard installation' of ubuntu. Output should be a single file with information regarding the changes that were made and a timestamp.

Perhaps there is even a way to put all that in a script and let it run regularly to automatically keep track of future config file changes.


Solution

  • If the files are already modified, I guess your only option is to diff your files with a fresh install. Keep in mind some files might be specific to you computer, I'm thinking of files that can hold device-specific values like your mac address udev/rules.d/70-persistent-net.rules, your drives uuid /etc/fstab, etc.

    If you're planning this ahead, there are at least two options you can consider:

    1. use a VCS such as git.
    2. use a filesystem that keeps a complete history of the changes made.