You are not logged in.
Something I threw together a while ago, may come in handy when Corenomial gets to work on Jessie....
A simple bash that lists everything you have installed from install date, with install date.
#!/bin/bash
#pkginstalls.sh
#creates text file with a list of all packages installed by date
#first append all info from archived logs
i=2
mycount=$(ls -l /var/log/dpkg.log.*.gz | wc -l)
nlogs=$(( $mycount + 1 ))
while [ $i -le $nlogs ]
do
if [ -e /var/log/dpkg.log.$i.gz ]; then
zcat /var/log/dpkg.log.$i.gz | grep "\ install\ " >> $HOME/pkgtmp.txt
fi
i=$(( $i+1 ))
done
#next append all info from unarchived logs
i=1
nulogs=$(ls -l /var/log/dpkg.log.* | wc -l)
nulogs=$(( $nulogs - $nlogs + 1 ))
while [ $i -le $nulogs ]
do
if [ -e /var/log/dpkg.log.$i ]; then
cat /var/log/dpkg.log.$i | grep "\ install\ " >> $HOME/pkgtmp.txt
fi
i=$(( $i+1 ))
done
#next append current log
cat /var/log/dpkg.log | grep "\ install\ " >> $HOME/pkgtmp.txt
#sort text file by date
sort -n $HOME/pkgtmp.txt > $HOME/pkginstalls.txt
rm $HOME/pkgtmp.txt
exit 0
Assumes you have log files! (Many may have switched them off if following SSD tutorials)
Offline
Something I threw together a while ago, may come in handy when Corenomial gets to work on Jessie....
A simple bash that lists everything you have installed from install date, with install date.
...
Assumes you have log files! (Many may have switched them off if following SSD tutorials)
ls: cannot access /var/log/dpkg.log.*.gz: No such file or directory
does that mean I got LOG FILES turned off?
"How can you learn how to fix it, if you don't break it first? :8
"the only way to get away with murder is - by killing time" swp 1997 8o
"A computer is only as smart as the person using it"
"Just plug it in and see if it blows up, if not then take it apart and figure out how it works."
Offline
Possibly.
What does
ls -al /var/log | grep dpkg
return?
Offline
Possibly.
What does
ls -al /var/log | grep dpkg
return?
userx@rebanged-crunchbang:~$ ls -al /var/log | grep dpkg
-rw-r--r-- 1 root root 36081 Nov 2 13:54 dpkg.log
-rw-r--r-- 1 root root 1156436 Oct 31 18:45 dpkg.log.1
userx@rebanged-crunchbang:~$
that -
do I got a run that script sudo mode?
userx@rebanged-crunchbang:~$ sudo $HOME/./whatsInstalled
ls: cannot access /var/log/dpkg.log.*.gz: No such file or directory
userx@rebanged-crunchbang:~$
Nope sudo didn't work either -- Hum? 8)
Last edited by userx-bw (2014-11-09 01:32:45)
"How can you learn how to fix it, if you don't break it first? :8
"the only way to get away with murder is - by killing time" swp 1997 8o
"A computer is only as smart as the person using it"
"Just plug it in and see if it blows up, if not then take it apart and figure out how it works."
Offline
A useful script for my toolkit. But I have redone it as a function for my /root/.bash_aliases.
debhist() { zgrep -h '\ install\ ' /var/log/dpkg.log* | sort -n | cut -d $' ' -f 1,2,4 | sed -r 's/:[0-9a-z]+$//' | column -t ; }
## To view installed debs by date
debhist | less
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat