[Nagiosplug-help] Directory Size

Richard Gardner richard.gardner at varian.com
Mon Oct 25 23:44:01 CEST 2004


Just one suggestion

du $1 

by itself will yield a huge amount of output, throw in commandline switches
to give it brevity

#!/bin/sh
Du -sh $1

-s for summarize, -h for human readable.

=)

-----Original Message-----
From: nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of Greg
Vickers
Sent: Monday, October 25, 2004 9:37 PM
To: nagiosplug-help at lists.sourceforge.net
Subject: Re: [Nagiosplug-help] Directory Size

Here ya go:

$cat dir-size.sh

#!/bin/sh
du $1;

usage: dir-size.sh <directory>

barry.maclean wrote:
> I'm looking for a script that I can monitor the size of a directory.
> 
>  
> 
> Thanks Barry
> 

--
Greg Vickers
Security Engineer
Network Services
Information Technology Services
Queensland University of Technology

email: g.vickers at qut.edu.au
phone: (07) 3864 9536

CIROS code: 00213J


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use
IT products in your business? Tell us what you think of them. Give us Your
Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Help mailing list