Perl script to check on Disk Usage

I wrote this script a while back to get a snapshot of my disk usage. Since I'm using a powerbook and hard drive space is limited, I thought it wise to make sure I didn't have too much garbage lying around my drive.

To use this script, simply download the disk_usage.pl file and place in a good location on your hard drive. Once you have downloaded the file, open up the Terminal application. Run the command:

chmod 755 /path/to/file/disk_usage.pl

Once you have set the execute permission, you can now run it.

perl /path/to/file/disk_usage.pl /your/dir/here/

where /path/to/file = the location where you downloaded the file and /your/dir/here the directory you want to scan.

The script simply does a scan of your drive using the unix 'du -ks' command and formats it cleanly in megabytes.


A screenshot of the script in action

zaftig defined

zaftig |ˈzäftig; -tik| (also zoftig)
adjective informal
(of a woman) having a full, rounded figure; plump.
ORIGIN 1930s: Yiddish, from German saftig ‘juicy.’

Featured Gallery

Sites I Like