In this post,we will know the linux command to find installation date and time of rpm package. As a Linux System Administrator,we take part in IT auditing activity. Sometimes for cross check we require the exact date and time of rpm file installed in Red Hat based Operating System (RHEL/CentOS/Scientific Linux). Hence,for auditing purpose,it is important to know about this command.

RPM stands for Red Hat Packet Manager. It is a package management system in all Red Hat based Operating System (RHEL/CentOS/Scientific Linux).RPM is also ported on other Operating System like IBM’s AIX and Novell’s Netware.
In RPM known file format .rpm is used. rpm.org community is involve in maintenance and development of RPM

Find installation date and time of rpm package

We will use rpm command with some options to find date-stamp information of installed package.

(1) List all rpm package with date and time information

Use the below given command to list all rpm package with date-stamp information

rpm -qa --last

(2) Show installed date and time of single package

To obtain the installed date and time information from single package.We have two commands

Command 1:
The below given command will show only Date,time and time zone when the rpm package was installed.

Syntax:

rpm -q --last package-name

For example.

[root@localhost ~]# rpm -q --last basesystem-10.0-4.el6.noarch
basesystem-10.0-4.el6.noarch                  Friday 21 February 2014 07:09:30 PM IST
[root@localhost ~]#

Command 2:

With below given command, it will show some more useful description.

Syntax:

rpm -qi package-name

For Example: In below given example check “Install Date” value.

[root@localhost ~]# rpm -qi rsyslog-7.6.0-1.el6.x86_64
Name        : rsyslog                      Relocations: (not relocatable)
Version     : 7.6.0                             Vendor: (none)
Release     : 1.el6                         Build Date: Thursday 13 February 2014 01:40:23 PM IST
Install Date: Saturday 01 March 2014 06:54:57 AM IST      Build Host: vmrpm.adiscon.com
Group       : System Environment/Daemons    Source RPM: rsyslog-7.6.0-1.el6.src.rpm
Size        : 2403604                          License: (GPLv3+ and ASL 2.0)
Signature   : RSA/SHA1, Thursday 13 February 2014 01:40:34 PM IST, Key ID e0f233b3e00b8985
URL         : http://www.rsyslog.com/
Summary     : a rocket-fast system for log processing
Description :
Rsyslog is an enhanced, multi-threaded syslog daemon. It supports MySQL,
syslog/TCP, RFC 3195, permitted sender lists, filtering on any message part,
and fine grain output format control. It is compatible with stock sysklogd
and can be used as a drop-in replacement. Rsyslog is simple to set up, with
advanced features suitable for enterprise-class, encryption-protected syslog
relay chains.
[root@localhost ~]#

Read Some More Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.