LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-04-2010, 06:13 PM   #1
yzhang738@hotmail.com
LQ Newbie
 
Registered: Oct 2010
Posts: 14

Rep: Reputation: 0
How to display all rpm installed sorted by date


Hi,

I'd like to know how to display all rpm installed list that is sorted by dated.

I use rpm -qa to list all rpm installed. But I want that list sorted by date and time.

Thanks.
 
Old 10-04-2010, 06:40 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Use:
Code:
rpm -qa --last
That will list with time and date. Newest first appear at the beginning of the listing.
 
Old 10-04-2010, 07:52 PM   #3
yzhang738@hotmail.com
LQ Newbie
 
Registered: Oct 2010
Posts: 14

Original Poster
Rep: Reputation: 0
rpm -qa --last lists all rpm with date and time. But I want to sort the list by date, with earlier rpm displayed first. So it needs pipe, rpm -qa --last | ... Any thought is welcome.
 
Old 10-04-2010, 10:31 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
I don't know how you can pipe this but you can achieve the results you want by redirecting to a file then reversing the contents of that file like so
Code:
rpm -qa --last > filename.txt
then do
Code:
tac < filename.txt > new_filename.txt
I hope this helps. If you do find a way to chain these two commands together please post the answer to this thread.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenate files sorted by date docaia Programming 5 08-16-2008 09:32 PM
Why does date always display utc? cmnorton Ubuntu 2 05-23-2008 11:01 AM
installed apache from source, didn't remove rpm, updated rpm causes problems leftPeg Linux - Newbie 5 06-06-2007 10:20 PM
display date user52 Linux - Newbie 2 11-28-2006 08:20 AM
Date display in Thunderbird kbcnetau Linux - Software 5 04-08-2005 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration