
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Quota tricks in perl
On Wed, May 08, 2002 at 06:43:23PM +0900, Jonathan Byrne wrote:
> I've seen several perl scripts for looking at (or even
> manipuulating) quotas, but they were all missing one
> trick I want: to find the owner of each directory
> below the current one and check that user's quota and usage, so
> I need to modify one for that little bit.
>
> I was thinking that the way to do this is to do the equivalent
> of ls -l in the current directory, split that line on whitespace,
> and extract the owner, but haven't been able to find the way to
> do that. Anyone know where I can find instructions for this, or
> a ready-made one? Or of course, a better way to do it if I'm
> all wet here :-)
>
> Shell-script is OK, too, but I'm more familiar with perl.
>
> Tx,
>
> Jonathan
perldoc File::Find
perldoc -f stat
that should give you everything you need to do what you want in
perl. If that leaves you a bit lost let me know and I will try
to hack up a script it should be fun.
--Matt
--
"WWJD? JWRTFM!!!" -- seen on /.
Home |
Main Index |
Thread Index