[olug] Speaking at Infotec April 14-15, 2009

Adam Haeder adamh at aiminstitute.org
Wed Apr 1 14:22:19 UTC 2009


And this is why I love the OLUG list. Obviously, this is a 100% better 
than my solution. Thanks for the comments! :) I am totally appropriating 
this script for my own nefarious purposes.

--
Adam Haeder
Vice President of Information Technology
AIM Institute
1905 Harney Street, Suite 700
Omaha, NE 68102
402-345-5025 x115
adamh at aiminstitute.org
www.aiminstitute.org
--------------------
Infotec09 is April 13-15, 2009
at the Qwest Center Omaha.
Register today at infotec.org!


On Wed, 1 Apr 2009, Dan Linder wrote:

> On Tue, Mar 31, 2009 at 5:01 PM, David Walker <olug at grax.com> wrote:
>
>> I generally use "du -shx *", which is easier to read but harder to sort.
>> Some of my older and smaller drives have mount points several levels
>> down for one reason or another and the "x" keeps the search restricted
>> to a single file system.
>>
>
> This is getting a little off track from Adam's original question, but I like
> using something like this:
>
> du -skx * | sort -n |  commas
>
> Where the script "commas" is a custom one-liner script:
> /usr/bin/perl -pe 's/(?<=\d)(?=(?:\d\d\d)+\b)/,/g'
>
> This keeps the data sortable, but adds commas to make the numbers more
> human-readable.
>
> dan at titan:~$ du -skx * | sort -rn  | head -7 |/usr/bin/perl -pe
> 's/(?<=\d)(?=(?:\d\d\d)+\b)/,/g'
> 269,451,108     Documents
> 70,986,560      tmp
> 38,821,412      FinalFrontier
> 17,758,380      Backups
> 3,532,404       enav_repo
> 1,629,932       Music
> 1,286,724       xen_system1.img
>
> Just my $0.005...  (Dang economy...)
>
> Dan
>
> -- 
> "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the
> Satires of Juvenal
> "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)
> ** *** ***** ******* *********** *************
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>



More information about the OLUG mailing list