On 15Aug2012 07:24, NOSpaze <nosp...@gmail.com> wrote:
| On Mon, 2012-08-13 at 20:41 +0100, Aaron Gray wrote:
| > On 13 August 2012 19:53, Jack Craig <jack.craig.ap...@gmail.com> wrote:
| >     du -ahx * | sort -rh | head -30
| 
| Kinda same approach with find, just for files...
| 
| find . -type f -print0 | xargs -0 du -h | sort -hr | head -30

Using "du" on a file is overkill. (Unless you have a lot of sparse files
in play, uncommon.)

Try:

  find . -type f -ls | sort -rn -k 7 | sed 30q

"head" is for the weak!

Note: sort's "-h" option (needed for du's -h output) is a GNU-specific
and _recent_ addition to GNU sort. Not very portable - your scripts will
break on many platforms.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au>

I have seen all the works that are done under the sun;
and, behold, all is vanity and vexation of spirit.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to