in reply to Re: cron job to delete files?
in thread cron job to delete files?

I'm sorry, I just figured I was writing a perl script to do a job so I might as well ask the question here, sorry though.

And if you're feeling lucky... come and take me home And if you feel loved If you feel lucky, if you feel loved If you feel lucky, if you feel loved You've crossed the walls - Excelled Further along through their hell All for my heart, I watch you kill You always have, you always will Now spread your wings and sail out to me....

Replies are listed 'Best First'.
Re: Re: Re: cron job to delete files?
by sauoq (Abbot) on Jul 04, 2003 at 03:06 UTC
    I just figured I was writing a perl script to do a job

    There's probably no good reason to use Perl for that. I would think that rm would do just fine.

    -sauoq
    "My two cents aren't worth a dime.";
    
      Unless the filename varies in some complicated way (simple example - the files are named for the yyMMDD and you want to delete yesterday's file) or there are other factors that need the power of perl. I used to do not very complicated stuff in ksh scripts (before I knoew perl) and it truly sucked.

      --Bob Niederman, http://bob-n.com

        That's why there's find :) (You'll want to use -exec rm {} \;, or maybe -exec rm -i {} \; the first time.)

        --
        Allolex

Re: cron job to delete files?
by Abigail-II (Bishop) on Jul 04, 2003 at 07:23 UTC
    I just figured I was writing a perl script to do a job so I might as well ask the question here

    Considering that you were very likely sitting in a chair while writing the job, did you consider contacting customer service of a furniture store about your cron question?

    Abigail

      Ya know, I didn't.

      And if you're feeling lucky... come and take me home And if you feel loved If you feel lucky, if you feel loved If you feel lucky, if you feel loved You've crossed the walls - Excelled Further along through their hell All for my heart, I watch you kill You always have, you always will Now spread your wings and sail out to me....

      Yeah! I tried them, but they suggested I come here.