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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List accordingly to time.

Status
Not open for further replies.

runa12345

IS-IT--Management
Jul 13, 2006
9
0
0
US
Hi All..
I have a list of files where I have to extract only few files and sort them in the order of time.


For example:

-rw-rw-r-- 1 adm ar 20925 Aug 04 05:44 Bi.Art
-rw-rw-rw- 1 adm ar 367793 Jul 30 22:21 Bi.Art
-rw-rw-rw- 1 adm ar 32930623 Jul 13 15:52 Bi.Bio
-rw-rw-rw- 1 adm ar 32905907 Jul 14 11:26 Bi.Bio
-rw-rw-rw- 1 adm ar 31646793 Jul 20 14:18 Bi.Art
-rw-rw-rw- 1 adm ar 32382077 Jul 31 08:55 Bi.Art

I want something like this:


-rw-rw-rw- 1 adm ar 31646793 Jul 20 14:18 Bi.Art
-rw-rw-rw- 1 adm ar 367793 Jul 30 22:21 Bi.Art
-rw-rw-rw- 1 adm ar 32382077 Jul 31 08:55 Bi.Art
-rw-rw-r-- 1 adm ar 20925 Aug 04 05:44 Bi.Art

I like to display the output based on *Art* and ls -l(mean based on the day and time).How can I exactly put them in an expression. I am trying to grep the Art and pass to ls -l..but not able...I like to know how can put an expression.

Thank you...



 
Something like this ?
ls -ltr | grep Art

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Even simpler :
ls -ldtr *Art*

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
wouldn't 'ls -lrt *Art' be easier?
Interesting..... how can you have 2 files with the same name under the same directory?

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Thank you,
I will try with the expressions.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top