Skip to content

Instantly share code, notes, and snippets.

@mdesantis
Last active December 16, 2015 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdesantis/5404609 to your computer and use it in GitHub Desktop.
Save mdesantis/5404609 to your computer and use it in GitHub Desktop.
Diff between package etc contents and current etc contents
#!/bin/bash
# From this stackexchange question: http://unix.stackexchange.com/questions/72746
set -e
package=php5-fpm
mkdir $package
cd $package
# download the package
apt-get download $package
# deb package files are ar archives
ar vx $package*.deb
# containing some compressed tar archives
tar xzf data.tar.gz
# now you have the files
# you can get diffs for all of the files in etc if you would like
find etc -type f |
while read file ; do
diff $file /$file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment