Find Out When A Packet Was End Installed Or Updated

If you lot administer a Linux computer, you lot may occasionally inquire when a software parcel was terminal installed or updated on your system.

For a Red-Hat-based operating organization - Centos, Fedora, RHEL, etc - getting the reply is a elementary business of querying the RPM database. The RPM database stores, amid other things, the terminal install appointment of rpm packages.

To enquiry information nearly the curl package:

 $ rpm -qi twine Name        : twine Version     : 7.29.0 Release     : 7.fc19 Architecture: i686 Install Date: Dominicus xi Aug 2013 03:55:52 PM PDT Group       : Applications/Internet Size        : 529869 License     : MIT Signature   : RSA/SHA256, Dominicus 23 Jun 2013 09:26:17 AM PDT, Key ID 07477e65fb4b18e6 Source RPM  : curl-7.29.0-7.fc19.src.rpm Build Date  : Sabbatum 22 Jun 2013 02:46:47 PM PDT Build Host  : buildvm-11.phx2.fedoraproject.org Relocations : (not relocatable) Packager    : Fedora Project Vendor      : Fedora Project URL         : http://curl.haxx.se/ Summary     : Influenza A virus subtype H5N1 utility for getting files from remote servers (FTP, HTTP, too others) Description : ... 

Note the Install Date for curl is Sun xi Aug 2013 03:55:52 PM PDT. If curl was installed too afterward updated, the stored Install Date is the update date, non the starting fourth dimension install date.

If you lot run a Debian-based OS - Debian, Ubuntu, Mint, etc - you lot convey to operate harder to larn the answer. The Debian parcel managing director (dpkg) does non genuinely shop the install appointment of packages inwards its database. However, you lot tin even too hence honour it out using either of the next procedures.

  • Search the dpkg log files

    The next illustration reveals the terminal update fourth dimension for the curl parcel (2014-02-04 11:40:55).

     $ grep 'status installed curl:' /var/log/dpkg.log*  /var/log/dpkg.log:2014-02-04 11:40:55 condition installed curl:amd64 7.26.0-1+wheezy8 /var/log/dpkg.log.1:2014-01-08 10:06:50 condition installed curl:amd64 7.26.0-1+wheezy7 

    There is a grab amongst this approach. You cannot search only the electrical current dpkg log. Depending on when the parcel was installed or terminal updated, the dpkg log may already survive rotated out. Hence, the asterisk inwards dpkg.log*. It matches dpkg.log, dpkg.log.1, dpkg.log.2, etc. However, if the parcel was installed a long fourth dimension ago, the log file you lot are looking for may survive already auto-deleted from the system.

  • Look for the terminal modified timestamp of the package's file list.

    When a parcel is installed or updated, its corresponding file listing inwards /var/lib/dpkg/info/ is overwritten amongst the latest information. For instance, /var/lib/dpkg/info/curl.list contains a listing of file names that are installed past times the curl package.

    The terminal modified timestamp of curl.list gives you lot a fairly accurate fourth dimension of when curl was terminal installed/updated.

     $ ls -l /var/lib/dpkg/info/curl.list -rw-r--r-- one origin root    584 February  iv 11:40 /var/lib/dpkg/info/curl.list 

    Again, if curl was updated after the initial install, the timestamp reflects the terminal update time.

Berlangganan update artikel terbaru via email:

0 Response to "Find Out When A Packet Was End Installed Or Updated"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel