in reply to Age of dir in UNIX
While I'm not offering a complete solution. I think you might find this approach perhaps easier to follow.
In this case, we're talking 15 minutes. And I clobber the file (xargs rm).#!/usr/bin/perl -w use strict; my $arg1 = ('-XP . -type l -cmin'); my $arg2 = ('+15'); my $arg3 = ('xargs rm'); system("/usr/bin/find $arg1 $arg2 | $arg3");
Point being, you might find the command find a more reliable solution than stat.
Modify for your own needs. :)
HTH
--Chris
#!/usr/bin/perl -Tw use Perl::Always or die; my $perl_version = (5.12.5); print $perl_version;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Age of dir in UNIX
by kaka_2 (Sexton) on Dec 05, 2013 at 11:06 UTC | |
|
Re^2: Age of dir in UNIX
by oiskuu (Hermit) on Dec 05, 2013 at 17:04 UTC |