Wednesday, March 22, 2006
dpkg install time of packages
ls -alt /var/lib/dpkg/info/*.list
#!/bin/sh
CMDNAME=`basename $0`
BASEDIR="/var/lib/dpkg/info"
test -d $BASEDIR || { echo $BASEDIR does not exist; exit 0; }
cd $BASEDIR || { echo could not cd to $BASEDIR; exit 0; }
run() {
ls -al -t $OPTION *.list | awk '{print $6, $7, $8, $9}' | sed -e
's/.list//'
}
Usage() {
cat 1>&2 <<-EOE
Usage: $CMDNAME [option]
$CMDNAME lists install time of packages.
Default output is descending order.
Options:
--help - Display help message
--version - Display version information
--full-time - Display time stamp in iso format
EOE
}
Version() {
cat 1>&2 <<-EOE
$CMDNAME Version: alpha 00.01
Wed Mar 22 11:41:17 PST 2006 karlrink@google.com
EOE
}
case "$1" in
--help)
Usage
exit 1
;;
--version)
Version
exit 1
;;
--full-time)
OPTION="--full-time"
run
;;
*)
run
;;
esac
exit 0
#!/bin/sh
CMDNAME=`basename $0`
BASEDIR="/var/lib/dpkg/info"
test -d $BASEDIR || { echo $BASEDIR does not exist; exit 0; }
cd $BASEDIR || { echo could not cd to $BASEDIR; exit 0; }
run() {
ls -al -t $OPTION *.list | awk '{print $6, $7, $8, $9}' | sed -e
's/.list//'
}
Usage() {
cat 1>&2 <<-EOE
Usage: $CMDNAME [option]
$CMDNAME lists install time of packages.
Default output is descending order.
Options:
--help - Display help message
--version - Display version information
--full-time - Display time stamp in iso format
EOE
}
Version() {
cat 1>&2 <<-EOE
$CMDNAME Version: alpha 00.01
Wed Mar 22 11:41:17 PST 2006 karlrink@google.com
EOE
}
case "$1" in
--help)
Usage
exit 1
;;
--version)
Version
exit 1
;;
--full-time)
OPTION="--full-time"
run
;;
*)
run
;;
esac
exit 0