Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort packages by install date 1

Status
Not open for further replies.

nychris

MIS
Dec 4, 2004
103
US
Is there a built-in command in Solaris that will list all installed packages sorted by the date they were installed? You can do this easily on RPM-based Linux systems by using the code below. I'm looking for an equivalent command in Solaris, if one exists.

Code:
# rpm -qa --last | head
kernel-PAE-2.6.18-194.26.1.el5                Thu 20 Jan 2011 11:53:17 PM EST
kernel-2.6.18-194.26.1.el5                    Thu 20 Jan 2011 11:53:01 PM EST
nscd-2.5-49.el5_5.7                           Sat 11 Dec 2010 06:51:33 PM EST
freetype-2.2.1-28.el5_5                       Sat 11 Dec 2010 06:51:33 PM EST
bzip2-1.0.3-6.el5_5                           Sat 11 Dec 2010 06:51:33 PM EST
pam-0.99.6.2-6.el5_5.2                        Sat 11 Dec 2010 06:51:31 PM EST
glibc-2.5-49.el5_5.7                          Sat 11 Dec 2010 06:51:26 PM EST
glibc-common-2.5-49.el5_5.7                   Sat 11 Dec 2010 06:51:16 PM EST
cups-1.3.7-18.el5_5.8                         Thu 02 Dec 2010 06:38:27 PM EST
poppler-utils-0.5.4-4.4.el5_4.11              Thu 02 Dec 2010 06:38:24 PM EST
 
The command to dump all installed package info is
pkginfo -l
but I don't know any way to make it sort or give only the install date, other than using a lot of commands to parse the output.

This should do what you want though:

ls -lt /var/sadm/pkg

/var/sadm contains data form all package and patch installations. Don't modify or delete anything under /var/sadm, but the directory dates on each package there should reflect the install date.
 
The simple 'ls -lt /var/sadm/pkg' you posted should work fine. Thanks, I didn't think of that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top