RE: Deleting a file after download/upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

> -----Original Message-----
> From: Parham Doustdar [mailto:parham90@xxxxxxxxx] 
> Sent: Tuesday, June 23, 2009 12:33 PM
> To: php-general@xxxxxxxxxxxxx
> Subject:  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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux