Created
April 27, 2014 22:08
-
-
Save heyalexej/11356827 to your computer and use it in GitHub Desktop.
Log Of All Installed .deb Packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# dpkgdump.sh | |
# creates text file with a list of all packages installed by date | |
TMP0=`mktemp "${TMPDIR:-/tmp}"/dpkgdump.col.XXXXXXXXXX` | |
TMP1=`mktemp "${TMPDIR:-/tmp}"/dpkgdump.res.XXXXXXXXXX` | |
# next append current log | |
find /var/log -maxdepth 1 -type f -regex ".*\dpkg\.log\.[0-9].gz$" | xargs zcat > $TMP0 | |
# get unzipped logs | |
find /var/log -maxdepth 1 -type f -regex ".*\dpkg\.log\.?[0-9]?+$" | xargs cat >> $TMP0 | |
# sort text file by date | |
cat $TMP0 | sort -n > $TMP1 | |
cat $TMP1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
helps examining dpkg log files on foreign systems or when something is messed up etc..
by default the script is writing to stdout after it created the combined and sorted log file. so you can use it with your favorite tools to further examine what's going on.
examples:
further infos:
https://help.ubuntu.com/community/ListInstalledPackagesByDate