LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Tracing Installed date of systems and packages (https://www.linuxquestions.org/questions/linux-general-1/tracing-installed-date-of-systems-and-packages-478355/)

Swakoo 08-29-2006 04:16 AM

Tracing Installed date of systems and packages
 
Hi guys,

is it possible to trace the installed date of the entire system (first install) and the installed date of packages?

thanks!

unSpawn 08-29-2006 07:16 AM

is it possible to trace the installed date
Sure.


of the entire system (first install)
Depends on if you can find either files that haven't been modified (mtime, not ctime) since installation, an installation log, or something like "tune2fs -l /dev/hddevice | grep created".


and the installed date of packages?
That's easier if you use a distro that has an evolved package management system:
Code:

epoch2date() { EPOCH="$1";
/bin/date '+%Y-%m-%d %H:%M:%S %Z' --date "Jan 1, 1970 01:00:00 + $EPOCH seconds"; }
rpm -qa --queryformat="%{NAME} %{INSTALLTIME}\n" | while read pkg epoch; do
 echo "${pkg} $(epoch2date $epoch)"
done



All times are GMT -5. The time now is 08:59 PM.