The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-16-2007
igidttam igidttam is offline
Registered User
 

Join Date: Sep 2005
Posts: 22
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
Reply With Quote
Remove advertisements
!!
Forum Sponsor