You could write a script that reads a file that contains a list of files.
Compare the modification file of each file to the current date, if the file
is at least two days old try and delete it.

Then schedule this script to run everyday, take a look at:
 man crontab

Cheers,

-----------------------------------------
Craig Moynes




                                                                                       
                                                
                      Francesco                                                        
                                                
                      Guglielmo                To:       Anders Holm 
<[EMAIL PROTECTED]>, beginners <[EMAIL PROTECTED]>       
                      <f.guglielmo@caen        cc:                                     
                                                
                      .it>                     Subject:  Re: Date                      
                                                
                                                                                       
                                                
                      07/12/2002 10:41                                                 
                                                
                      AM                                                               
                                                
                                                                                       
                                                
                                                                                       
                                                



Anders Holm wrote:

>>I need to do a Perl script who do a certain command after 2 days.Example:
>>my file contains
>>
>>8 Jul 2002
>>
>>when I lunch the script it must control the date and if it's equal to
>>date+2 (in this case 10 Jul 2002) execute my commands trought system.I
>>thought to do this transforming the date in this format to days from the
>>begin of the year but I don't know how.Thanks for your help,
>>Francesco
>>
>
>Why do you need to do things this way? There is a perfectly good deamon in
>*nix called crond that would help you to schedule tasks at certain times.
>
>I think the list would like to know more exactly what you want to achieve
in
>order to help you better...
>
I want to delete a "file" two days after his creation.Files are listed
in another file.How can I do this?\
And how with crond?Thanks


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to