Tracking or auditing Linux configuration changes

As a paranoid user, we sometimes want to know what configuration changed since we install something or upgrading using apt-get upgrade or pacman -Syu. We can use git to track changes in our filesystem, for example:

cd /
sudo git init .

create .gitignore file containing, for example:





and then just add it to our repository:

git add .
git commit -m 'initial filesystem'

After that, just run the package manager's upgrade system command. When there are changes, we could see which files/folders that changed, by typing:

git status

And see the changes for one file:

git diff /path/to/file

This trick also can be used to track history or backup your system's configuration, just use private repository on bitbucket.

No comments :

Post a Comment

THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?