|There's more than one way to do things|
search folder and delete certain files with perlby ravvles (Initiate)
|on Dec 07, 2011 at 19:35 UTC||Need Help??|
ravvles has asked for the
wisdom of the Perl Monks concerning the following question:
I wonder if anyone can help me. I'm fairly new to Perl and I'm due to go on my first Perl for beginners course next week.
I've been set a task my boss to do the following ... but i'm really struggling to do it ( kinda unfair as I don't know Perl AT ALL yet :-( ) ....
Use a Perl script to .......
Search the contents of a specific folder ( /var/opt/xim/syslogs/ ) on a linux computer. Delete any files in that folder that begin with "Syslogd" (eg Syslogd001 Syslogd002 Syslogd003 Syslogd004 etc) and are older than 12 hours ( or haven't been modified in the past 12 hours )