Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sorting on fields for last date Post 302910305 by in2nix4life on Wednesday 23rd of July 2014 01:08:22 PM
Old 07-23-2014
Code:
sort -r -k5 -k4M -k3 infile | head -n1

If you're generating this list from a system the following command will list all the installed RPMs by install date starting with the most recent installations:

Code:
rpm -qa --last

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sorting on date

I have a file where dates in the form mm/dd/yyyy is the first field. How do I sort the file by the date field? Thanks, Duckman (6 Replies)
Discussion started by: Duckman
6 Replies

2. UNIX for Dummies Questions & Answers

date sorting

Hi at all, I have to sort a log file on timestamp field. That's field is the third! a log file sample..... 1|EVTVOD-1-20060709_000614|2006/07/09-0:11:23|0.3.8 1|EVTVOD-1-20060709_000614|2006/07/09-0:11:16|0.3.8 1|EVTVOD-1-20060709_000614|2006/07/09-0:11:20|0.3.8... (3 Replies)
Discussion started by: nmilella
3 Replies

3. Shell Programming and Scripting

Date Sorting

Hi, I have a list of files that take on the format ABCDE_yymmdd and wish to sort them in ascending date order. I can't use the unix time stamp for the file as this could possibly be different from the date given in the file name. Does anyone know of any way this can be done using unix shell... (14 Replies)
Discussion started by: LiquidChild
14 Replies

4. UNIX for Dummies Questions & Answers

Sorting Compressed Fields

Are any of you guys aware of any problems when trying to sort compressed fields? Why I uncompress the file I am trying to sort, I have no problem sorting but when I try to sort compressed fields it doesnt work properly. I need to be able to sort these compressed fields. Any explanation why? (1 Reply)
Discussion started by: ndoggy020
1 Replies

5. UNIX for Dummies Questions & Answers

Sorting 2 positional fields

Hi Friends, I've a large datafile, I've to sort the entire records of this file based on the positions. For ex: ccc112IVEAGH VETERINARY SERVICES cca110SHOOTER PROPERTY SERVICES bbb111JUNIOR GOLF ACADEMY LIMITED aaa110AULD PROPERTIES T/A R&J AULD ccb111LISBURN FUELS aac112P & MRS C... (1 Reply)
Discussion started by: ganapati
1 Replies

6. UNIX for Dummies Questions & Answers

sorting fields of a line

Hi all, I have a file that looks like this... ########## 1zz2_15-43 1ouy_0-13-35 1.12619901947 2gfs_41-7 1yqj_3 0.793602121208 1bl7_11-3 1wbo_1-3-4 0.791065168287 1ywr_16-3 2ghl_22 0.956896171134 2exc_11-35 1pmq_13-15-87 0.597677672501 2bal_25-7 1ouk_17-19-21-228-58 0.668388304836... (6 Replies)
Discussion started by: Digby
6 Replies

7. Shell Programming and Scripting

sorting(both Ascending & Descending) files based on multiple fields

Hi All, I am encountered with a problem while sorting a file based on multiple columns . I need to sort like: (field2,ascending) , (field3,ascending) ,(field8,descending) , (field7,ascending),(field13,ascending). So far i was sorting only in ascending order but here i need to use one... (1 Reply)
Discussion started by: apjneeraj
1 Replies

8. Shell Programming and Scripting

AWK multiple line fields sorting

I have a bash script which takes a log file with each record separated by a #. The records have multiple fields but field $1 is always the date and time. When the script is run it prints the record just fine from oldest to newest. I need to have records print out from newest first. Here is the... (7 Replies)
Discussion started by: numele
7 Replies

9. Shell Programming and Scripting

[Solved] Sorting by several fields

Hello, I have a file with information separated by ";" like this: ABC;20110126000008;00-10-95-29-17-C6;2;37190292 ABC;20110126000008;00-10-95-29-17-C6;1;53140866 ABC;20110126000008;00-10-05-01-11-38;2;11182251 ABC;20110126000008;00-10-05-01-11-38;1;25952816... (3 Replies)
Discussion started by: rubber08
3 Replies

10. Shell Programming and Scripting

Sorting by date

I am trying to sort by two columns. The first column in an ID, the second is a date in the form yyyy-mm-dd. I need to sort by the ID column, then in ascending order for the date column (earliest date to most recent date compared to today). Input data: 012-abc 2012-04-25 ... (3 Replies)
Discussion started by: mollydog11
3 Replies
MAKEDELTARPM(8) 					      System Manager's Manual						   MAKEDELTARPM(8)

NAME
makedeltarpm - create a deltarpm from two rpms SYNOPSIS
makedeltarpm [-v] [-V version] [-z compression] [-s seqfile] [-r] [-u] oldrpm newrpm deltarpm makedeltarpm [-v] [-V version] [-z compression] [-s seqfile] [-u] -p oldrpmprint oldpatchrpm oldrpm newrpm deltarpm DESCRIPTION
makedeltarpm creates a deltarpm from two rpms. The deltarpm can later be used to recreate the new rpm from either filesystem data or the old rpm. Use the -v option to make makedeltarpm more verbose about its work (use it twice to make it even more verbose). If you want to create a smaller and faster to combine "rpm-only" deltarpm which does not work with filesystem data, specify the -r option. makedeltarpm normally produces a V3 format deltarpm, use the -V option to specify a different version if desired. The -z option can be used to specify a different compression method, the default is to use the same compression method as used in the new rpm. The -s option makes makedeltarpm write out the sequence id to the specified file seqfile. If you also use patch rpms you should use the -p option to specify the rpm-print of oldrpm and the created patch rpm. This option tells makedeltarpm to exclude the files that were not included in the patch rpm but are not byteswise identical to the ones in oldrpm. makedeltarpm can also create an "identity" deltarpm by adding the -u switch. In this case only one rpm has to be specified. An identity deltarpm can be useful to just replace the signature header of a rpm or to reconstruct a rpm from the filesystem. SEE ALSO
applydeltarpm(8) combinedeltarpm(8) AUTHOR
Michael Schroeder <mls@suse.de> Feb 2005 MAKEDELTARPM(8)
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy