@@ 0,0 1,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