India Broadband Forum


Find the top 5 small file

This is a discussion on Find the top 5 small file within the Linux forums, part of the Operating Systems category; Technique is same as finding the bigger files, but the only difference the sort is ascending order. # find . ...

Go Back   India Broadband Forum > Computers > Operating Systems > Linux

India Broadband Forum


                      

Reply

 

LinkBack Thread Tools Display Modes
Old 07-17-09, 12:28 PM   #1
Junior Member
 
Join Date: Jul 2009
Posts: 16
Rep Power: 1
vasudha is on a distinguished road
Default Find the top 5 small file

Technique is same as finding the bigger files, but the only difference the sort is ascending order.

# find . -type f -exec ls -s {} \; | sort -n | head -5


In the above command, most probably you will get to see only the ZERO byte files ( empty files ). So, you can use the following command to list the smaller files other than the ZERO byte files.

# find . -not -empty -type f -exec ls -s {} \; | sort -n | head
vasudha is offline   Reply With Quote
Reply

Tags
file, find, small, top

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Remove big archive file using find command vasudha Linux 0 07-17-09 12:21 PM
Deleted a file? Find in black market Rameshjeee News from the Tech and IT World 0 11-06-08 11:31 PM
small jokes xfilos Jokes and humor 0 10-27-08 10:23 PM
Small Help.... carbon BSNL broadband 2 05-19-08 08:22 PM


All times are GMT +5.5. The time now is 08:42 PM.


India Broadband Forum