~mikini/hometools

ref: 637040b13e70a39c89ba1e76df7dfeed6a0fe916 hometools/dpkg-conf-diff -rwxr-xr-x 568 bytes
637040b1 — Mikkel Kirkgaard Nielsen Add COPYING and README.md 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/bash

# Pull md5 sums for package configuration files from APT db, print filename if
# file on disk differs.
#
# Inspired by;
# https://serverfault.com/questions/90400/how-to-check-for-modified-config-files-on-a-debian-system/90401#90401
#
# For exact diffs try;
# https://www.win.tue.nl/~rp/dpkg-bin/dpkgdiff

echo Configuration files contained in APT packages whose md5 hash has changed on disk.
echo
dpkg-query --show --showformat='${Conffiles}\n' '*' | awk 'OFS="  "{print $2,$1}' | LANG=C md5sum -c 2>/dev/null | awk -F': ' '$2 !~ /OK$/{print $1}' | sort