I need to find the last time that the
apt-get update
command was run on my server. How can I determine this information?
|
feedback
|
|
You could check the Access times on the files in /var/lib/apt/lists which is updated when you run apt-get update. If apt-get update was run with sudo you should have a line logged in /var/log/auth.log when it was done.. | |||||
feedback
|
|
Synaptic logs a history file (>File > History) , aptitude logs both history in /var/log/aptitude and auto-installed packages in /var/lib/aptitude/pkgstates, so you could check these for latest activity. Anapologetos | |||
|
feedback
|
|
/var/log/dpkg.log will keep a history of what was done, but not necessarily which app called dpkg (synaptic, apt-get, etc). | |||
|
feedback
|
|
I suspect you can check the last modified times on files /var/cache/apt to figure out when the last updates were applied to the package lists. I just tested this, and ran "sudo apt-get update" twice in a row, and the dates did not change from their current value, but I suspect this is because there were no new updates to apply, and that the caches are up to date. | |||
|
feedback
|
|
wrap apt-get in a script that first writes a timestamp to a file, and then does the usual work. that way, you can define the timestamp format and location ;) | |||
feedback
|
| |||
|
feedback
|