[Samba] file "time-to-live"

Brian Cuttler brian at wadsworth.org
Tue Jun 29 08:49:43 MDT 2010

You could write something to check file create times and
delete files older than 36 hours, and run if from cron
several times per day.

I'd suggest # find, but it doesn't have the granularity
you are looking for, you could run it at 00:01 and remove
files there where 2 days old.

I did somethign similar on a VMS system I was managing, worked
well until some enterprising student found (I don't believe
they wrote it themselves) a program to reset the time stamp
on their files (which your users may start doing as well, perhaps
using # touch). At which point I started looking for files with
creation dates in the future... many users of the date reset
program wheren't quite as smart as they thought they where.

On Tue, Jun 29, 2010 at 11:32:52AM -0300, Leonardo Carneiro - Veltrac wrote:
> Hi everyone,
> There is a way to make files being automatically deleted some time after 
> they have been created?
> I know that, with some scripting wizardry i could achieve this, but i 
> wanna know if samba has this kind of feature.
> I have a temp folder that users insist in use like a backup folder, so i 
> want to files to be deleted 24 hours after they have been created.
> I cannot just delete everything at midnight because this folder is used 
> in full time, so if a user create a file at 23h59, it would be deleted a 
> minute later.
> Sorry for my poor english and tks in advance.
> -- 
> Leonardo Carneiro
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
   Brian R Cuttler                 brian.cuttler at wadsworth.org
   Computer Systems Support        (v) 518 486-1697
   Wadsworth Center                (f) 518 473-6384
   NYS Department of Health        Help Desk 518 473-0773

IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.

More information about the samba mailing list