Bash Script to Monitor Space by Directory.
Terrence Enger
tenger-P1ovA8G34VBEfu+5ix1nRw at public.gmane.org
Fri Dec 11 12:44:38 UTC 2009
On Wed, 2009-12-09 at 08:27 -0800, Dennis Antle wrote:
> Hi Everyone,
>
> This is my first post.
>
> I have a SAN that is nearly full.
> I'm able to monitor the SAN volume using df, but it don't tell me
> where the growth took place.
> So I need to develop a bash script to monitor changes in size by
> directory, on the SAN volume.
> I'm looking for advise as to how to go about this?
>
>
> ______________________________________________________________________
This is not what you are looking for, but ...
Several years ago, I wrote a program which would take the output from
`ls -lR` of whatever, for each file or directory calculate the rolled-up
size (meaning for a directory the recursive total size of all its
contents), and sort the result by descending rolled-up size. The
resulting list was enormous, but generally it was not hard to the
interesting bits: you would ignore the first few lines (you already
know that / is going to be big, don't you?), and after some number of
further lines you are down to numbers small enough that you don't care
to read any further.
I have not tried to use this for a long time, as I have been able to buy
enough lotsabytes of disk to meet my needs. If anybody cares, I shall
see what I can resurrect.
Cheers,
Terry.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list