![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find largest file | mohan705 | Shell Programming and Scripting | 15 | 07-03-2007 11:34 PM |
| list largest files in a directory & its subdirectories | igidttam | UNIX for Dummies Questions & Answers | 6 | 09-25-2006 08:31 AM |
| largest size directory in unix | arunkumar_mca | UNIX for Advanced & Expert Users | 5 | 09-29-2005 10:04 PM |
| Finding largest file in current directory? | AusTex | High Level Programming | 1 | 03-13-2005 09:03 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
find the 5o largest files in a directory
I'm trying to find the 50 largest file in a directory named /sasdb and its' subdirectories. I'm using the find command and a pipe to awk
Not sure if I'm actually getting the largest files from this directory and its subdirectories. Here is the code I used... find /sasdb -ls | awk '{print $0}' | sort -n >> my.lst tail -50 my.lst >> largest_files.lst Any suggestions would be greatly appreciated. Thank You |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
you first approach should be fine, just that you should check $0 , i don't think its the size. but pls do check. Code:
find /home/test -type f -ls | awk '{print $7}' | sort -n | tail -50
|
|||
| Google UNIX.COM |