The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
list the files but exclude the files in subdirectories shyjuezy UNIX for Dummies Questions & Answers 8 10 Hours Ago 10:42 AM
List only the files chandran.m SUN Solaris 5 12-06-2007 11:03 AM
list of files bkan77 UNIX for Advanced & Expert Users 7 08-15-2007 08:09 AM
list files alisevA3 UNIX for Dummies Questions & Answers 2 03-20-2007 10:40 PM
list files avadhani UNIX for Dummies Questions & Answers 7 06-20-2005 11:25 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-25-2007
Registered User
 

Join Date: Oct 2007
Posts: 2
Thumbs up How to list top 10 files

Hello everybody;

I am new to unix.

Thanks for creating such a informative forum,

I wanted to know that how can i list top 10 files in my current dir. which were accesed recently by using ls command.

Thank You.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-25-2007
Registered User
 

Join Date: Oct 2007
Posts: 1
Thumbs up displaying the first 10 rows or records

try typing: head name of the file where the document is contained
Reply With Quote
  #3 (permalink)  
Old 10-25-2007
Registered User
 

Join Date: Oct 2007
Posts: 1
Re: How to list top 10 files

if u typed ls -al, u can use:
ls -al | head - 11
as the first line is the total size

while if u just typed ls, u can use
ls | head
as head command shows first 10 line

head -n 20, shows 20 line, an so on ...


I hope this will solve your problem
Reply With Quote
  #4 (permalink)  
Old 10-25-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 767
Code:
ls -ltu | head -10
for more details:
Code:
man ls
To know about what is access time, see this
Reply With Quote
  #5 (permalink)  
Old 10-26-2007
Registered User
 

Join Date: Oct 2007
Posts: 2
Thumbs up

Thank you friends for your help.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0