#!/usr/bin/perl # # du that will show listing like df -h in mb. # $pwd = `pwd`; @crap = split(/ /, `du -sk`); foreach $turd (@crap) { $turd =~ s/\s//ig; $turd =~ s/\.//ig; $turd =~ s/\n//ig; $log = ($turd/1024); $floater = ($log/1024); printf "%10.2f Kbytes \n%7.2f MB's \n%4.3f GB's \nin $pwd",$turd, $log +, $floater; }
Edited 2001-03-09 by mirod: added <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: df -mb
by robobunny (Friar) on Feb 27, 2002 at 20:22 UTC |