How to check what files have been customised in /etc?

Colin Watson cjwatson at ubuntu.com
Sun Dec 13 11:50:37 UTC 2020


On Sun, Dec 13, 2020 at 09:58:48AM +0000, Chris Green wrote:
> However there are inevitably a few global customisations in /etc and
> I'd like to track them as well if possible.  I can configure ways to
> track them now but can anyone suggest a way to find all the changes I
> have done over the years in /etc?

It's not possible in general, because a number of files in /etc are
handled programmatically such that a base "unmodified" version of the
file isn't really recorded.  However, you can at least in principle do
it for all the files in /etc that are shipped in packages, referred to
as "conffiles".  I don't know of a way that isn't still quite
cumbersome, but something like "grep-status -sPackage,Conffiles -FStatus
'install ok installed' --and -FConffiles ." will show all the installed
packages with conffiles, and then you can download each of the relevant
packages, unpack them into a temporary directory, and compare.

On an ongoing basis, I recommend etckeeper.

-- 
Colin Watson (he/him)                              [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list