> -----Original Message-----
> From: Parham Doustdar [mailto:parha...@gmail.com] 
> Sent: Tuesday, June 23, 2009 12:33 PM
> To: php-general@lists.php.net
> Subject: [PHP] Deleting a file after download/upload
> 
> My server connects to an FTP. Then, it downloads a file from 
> the FTP, and then sends me the link to that temperary file on 
> the server. Now, when I download it from my server, my script 
> should delete the file. How can I make it wait until the 
> download of the file is finished?

# sudo crontab -e

Append this to the end...

15 * * * * root find /tmp/downloads -mtime +5 -type f -exec rm -rf {} \;


That will run every 15 minutes and purge anything in /tmp/downloads that is
over 5 days old


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to