On Mon, 22 Apr 2002 [EMAIL PROTECTED] wrote:

> I said:
>
> > in other words, given: "1234M /home/USER" I want "USER" so as to then turn
> > around and email that user. (I already have
> > way of removing non-user directories in /home).

Woo hoo!

Thanks for all the lightning fast help.

I already had most of the script written, but now I think I'll go back
and re-write much of it thanks to all your input!

> You can use 'cut' or 'awk' for this:
>
>       du -sk /home/* | sort -nr | cut -f3 -d/

I think cut was what I was looking for.  Thanks,

(I was also going to do a 'du -chxs ~$USER/*' to get them a breakdown,
but I may modify that.)

>
> For the first 25 users or so, you could do something like:
[snip]
> Note, this isn't tested in any way.  It's just something to
> experiment with.

Thanks!  I might just incorporate parts of this.

The script is for a client, but I think I like the idea enough to make
it a little better than they need it. I'll probably make it a bit more
configurable with variables that can be set depending on the system (on
the one this is for, $home can be on any of three nfs mounted
filesystems...

Any way, again, thanks for all the help!


Brian


---------------------------------------------------------------
|  [EMAIL PROTECTED]                Spam me and DIE!       |
|                 http://www.datasquire.net                   |
|                 Co-Founder & Co-Owner of                    |
|              Data Squire Internet Services                  |
---------------------------------------------------------------


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to