This one time, at band camp, Adrian 'Dagurashibanipal' von Bidder said: > On Tuesday 12 October 2004 22.49, Emmanuel Lacour wrote: > > On Tue, Oct 12, 2004 at 07:33:36PM +0200, Adrian 'Dagurashibanipal' von > > > > I did run apt-get upgrade, but I can't say what packages were upgraded > > > (grr. Why doesn't dpkg write a log!?!?!?) > > > > apt-get upgrade -u > > ^^^ > > That still doesn't get me a log. Totally unrelated to your real question, but for this one: steve@hadrian:~$ cat usr/local/sbin/apt-get #!/bin/bash if [ ! -d /var/log/apt-get ]; then mkdir -p /var/log/apt-get fi filename="/var/log/apt-get/$(date +%Y%m%d%H%M%S)" echo "$0 $@" >> $filename echo "---" >> $filename /usr/bin/apt-get -q $@ 2>&1 | tee --append $filename Works nicely. Putting it in /usr/local/sbin makes it come first in root's default path, and has the advantage of being outside of regular user's path's so they can still 'apt-get source' without getting a permission denied on the log file. -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : sgran@debian.org | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
Attachment:
pgpEoRqkjGJFX.pgp
Description: PGP signature