Operating System - HP-UX
1753742 Members
4792 Online
108799 Solutions
New Discussion юеВ

listing directory contents by size

 
Dave Walley_1
Occasional Contributor

listing directory contents by size

Hi .

I have had a request to display the contents of a directory in size order, I
have user ll|sort +column number but what this does is sometimes it displays
rogue files in the listing. Has anyone out there got a command that will
display the listing in size order faithfully each time.

Any help will be greatly appreciated.

dave
3 REPLIES 3
Paul Heffels_1
Frequent Advisor

Re: listing directory contents by size

Hi Dave, have you tried "du" yet?
Alan Riggs_1
Regular Advisor

Re: listing directory contents by size

I've never had a problem with
ll | sort -n +4|grep -v total
Thomas Smith_8
New Member

Re: listing directory contents by size

My favorite is "du -s *|sort -rn|more"