Correct me if i'm wrong, you say use cron and a shell script (let's say bash) instead 
of perl? 
well, if there are any other ways of doing it instead of using cron, id love to head 
about it.
Is there a way to know when a user leaves the site? if so can i make it run the 
clearing script when a user leaves? (i know this isn't close, but IE like the way bash 
runs ~/.bash_logout when user logs out?)

[EMAIL PROTECTED] wrote:

>
>------------------------------------------------
>On Wed, 27 Aug 2003 16:18:00 +0200, Shahar Evron <[EMAIL PROTECTED]> wrote:
>
>> hi...
>> I'm working on a CGI program that creates some user-specific file on the 
>> server when accessed. is there a good way to make sure theese files are 
>> cleared when they're no longer needed - IE if a file in a specific 
>> directory was not accessed for 5 minutes, delete it.
>> Right now i'm thinking a croned script - but it would have to be run 
>> quite oftenly - won't that have a bad effect on my system?
>> I'd love to hear some ideas.
>
>This is highly dependent on the frequency with which you run the script, the number 
>of files, possibly the size of the files, etc. cron in itself is going to be running 
>anyways (most likely) having it fire up a single process to remove some files isn't 
>terribly slow, until you are talking about large amounts of files or you run it very 
>often like every couple of seconds.  So the question becomes how long "may" a file 
>stay out there, because this determines how frequently you must run the script, in 
>other words, if a file has not been accessed in five minutes but must be deleted 
>before it is stale for 6 minutes then you have to run the script every 59 seconds. 
>etc.
>
>If you must take this approach and are on a unix system, I would avoid a Perl script 
>and install a recent version of 'find' and use 'rm' instead. That should speed up the 
>file location and removal without the overhead of the perl interpreter being fired up.
>
>http://danconia.org
>
>http://danconia.org
>
>-- 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

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

Reply via email to