The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Cleanup Files on FTP automatically after 30 days

Is there a way to automatically delete files in a directory with subdirectories for all files / folders older than 30 days?

For image hosting.. that has images being deleted off server... after 30 days after last use.?

30days after upload..  or  better yet.. 30 days after last use / download would be better.. 

thatway inactive images are removed. to keep space free on webserver.

Please help..
Cleanup
Monday, February 05, 2007
 
 
Just hack together a script
Bob
Monday, February 05, 2007
 
 
find -ctime +30 -exec rm -f {} \;

will do it on a unix machine (run from the top directory you want to delete from...)
G Jones
Monday, February 05, 2007
 
 
sorry, misread 'last use'. change ctime to atime (access rather than create)
G Jones
Monday, February 05, 2007
 
 
can that be setup automatically to run on its own?

or I have to run that myself?

this is hosted on shared hosting.. do I dod that on php script? or cgi?
Cleanup
Monday, February 05, 2007
 
 
Run it as a cron job.
Trevor
Monday, February 05, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz