UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 7th, 2005, 05:54 AM
mmurali11 mmurali11 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 20 mmurali11 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 33 m 32 sec
Reputation Power: 0
How to list latest 10 files in Telnet

Hai Friend,

My requirement is , I want to list the last 10 files in Telnet. Now i am using the command 'ls -ltr'. This command list the all files. But I want latest 10 files. If you know , tell me

Thanks & regards
Murali

Reply With Quote
  #2  
Old August 8th, 2005, 03:54 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,098 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 7 h 31 m 24 sec
Reputation Power: 9
Quote:
Originally Posted by mmurali11
Hai Friend,

My requirement is , I want to list the last 10 files in Telnet. Now i am using the command 'ls -ltr'. This command list the all files. But I want latest 10 files. If you know , tell me

Thanks & regards
Murali


append to the cmd a '|tail -x'
where x is an int

tail -5 get lthe last 5 lines
__________________
working on Solaris[5-9], preferred languages french and C.

Reply With Quote
  #3  
Old August 8th, 2005, 04:06 AM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,297 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 10 m 50 sec
Reputation Power: 104
Send a message via ICQ to christo Send a message via Yahoo to christo
although that won't sort in date order.


christo

Reply With Quote
  #4  
Old August 8th, 2005, 04:17 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,098 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 7 h 31 m 24 sec
Reputation Power: 9
Quote:
Originally Posted by christo
although that won't sort in date order.


christo

he uses 'ls -ltr' so the files are reversed time sorted

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > How to list latest 10 files in Telnet


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT