How to list top 10 files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to list top 10 files
# 1  
Old 10-25-2007
MySQL 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.
# 2  
Old 10-25-2007
MySQL displaying the first 10 rows or records

try typing: head name of the file where the document is contained
# 3  
Old 10-25-2007
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
# 4  
Old 10-26-2007
Code:
ls -ltu | head -10

for more details:
Code:
man ls

To know about what is access time, see this
# 5  
Old 10-26-2007
MySQL

Thank you friends for your help.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Add filenames to top of each files in a directory

Hello, I tried different solutions given in various linux portals but no luck.. The directory consists of files with no-extension. Each file has only one line. I need to add each filename to the top of each file so eventually each file will have two rows. Filenames have spaces between words... (6 Replies)
Discussion started by: baris35
6 Replies

2. Shell Programming and Scripting

Record top accessed processes/files

Hello, I have about 100 servers that I'm looking to collect information regarding top files and processes accessed within a 168 hr (1 week) period. Each server has a different purpose and so different installed applications. All servers are running either unix or linux. What would be a... (0 Replies)
Discussion started by: umang2382
0 Replies

3. Shell Programming and Scripting

Adding characters at the top of all files in directory

Hi Unix experts; I have 30000 files in a directory and am willing to do the following changes on each of them. The input files look like the following: 1 , 2 3 , 4 5 , 6 7 , 8 9 , 10 the output will have # in top 10 lines, insert space instead of comma. This looks like: ... (4 Replies)
Discussion started by: nxp
4 Replies

4. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

5. AIX

Top command in AIX 4.2 (no topas, no nmon, no top)?

Is there a 'top' command equivalent in AIX 4.2 ? I already checked and I do not see the following ones anywhere: top nmon topas (1 Reply)
Discussion started by: Browser_ice
1 Replies

6. Shell Programming and Scripting

Sort top 5 files by FileSize

Hi All, i have one simple question on unix command. I have number files under one directiory and includes sub directories as well. Here, i need to find top 5 files whose sizes are big when compared to other files in ascending or descending order. please note that i need unix command for this... (3 Replies)
Discussion started by: dbsurf
3 Replies

7. Shell Programming and Scripting

find top 100 files and move them

i have some 1000 files in my dir and i want to find top 100 files and move them to some other location: below the 2 commands i used, but it is not working ls -ltr | grep ^- | head -100 | xargs mv destination - _________>not working ls -ltr | grep ^- | head -100 | xargs mv {}... (3 Replies)
Discussion started by: ali560045
3 Replies

8. Solaris

top biggest files

hi all, is there any way how i can output the top 10-30 biggest files for all filesystem? using du -sh * is quite tedious since i have to move from 1 directory at a time. thanks (3 Replies)
Discussion started by: 3rr0r_3rr0r
3 Replies
Login or Register to Ask a Question