~mikini/hometools

hometools/dpkg-conf-diff -rwxr-xr-x 568 bytes
158a6504 — Mikkel Kirkgaard Nielsen Exit on network error & indicate date of rate used a month 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