[olug] Unix Tip: LARGES FILES MORE FLAVORS
Unix Guru Universe
listserv at ugu.com
Mon Jun 16 15:43:29 UTC 2003
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 1993 - June 16, 2003
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
LARGES FILES MORE FLAVORS
Recently a single line
script was posted to UGU
to list the largest files
in a filesystem in order
of descending size.
The script worked as posted
on AIX but required tweaking
for SCO OSR5 and UW7.
Here 'tis for your
edification and enjoyment:
OSR5:
find $1 -type f -size +2048 -xdev -exec ls -s {} | /bin/sort -brut " "
UW7:
find $1 -type f -size +2048 -xdev -exec ls -s {} + | /bin/sort -nr
I placed the script in
/usr/local/bin and removed
the pipe to "more" in the
published version to allow
redirection to a file. I
also arbitrarily added the
"-size +2048" to the find
command to limit the list
to files of 1 Mb or larger;
you may modify or remove as
desired.
Thank you,
Lucky Leavell
--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today
==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.
Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================
More information about the OLUG
mailing list