Hi! I implemented the vfs reclycle and it?s really good! Now, I wanna to put on my monthly cron a script to clean old recycles... Someone have examples to send me ? Tips? Thanks ! Cheers Rodrigo Miranda Carvalhaes
Hi,
This is what I use:
/usr/bin/find /home/samba/Prgs/.recycle -type f -mtime +5 -exec /bin/rm {} \;
I suppose you know you will need one for each share.
It would be nice if there was a variable one could set so recycle.so would
limit how old the files get. This could be either per share or globally.
I hope this helps.
Rodrigo Carvalhaes (grupos@carvalhaes.net) wrote:>
> Hi!
>
> I implemented the vfs reclycle and it?s really good!
> Now, I wanna to put on my monthly cron a script to clean old recycles...
>
> Someone have examples to send me ? Tips?
>
> Thanks !
>
> Cheers
>
> Rodrigo Miranda Carvalhaes
>
>
>
--
Bob Crandell, CNS
Assured Computing, Inc.
When you need to be sure.
http://www.assuredcomp.com/
P.O. Box 40814
Eugene, OR 97404
Voice - 541-868-0331
FAX - 541-463-1627
Hi Joe! Thanks for your promptly answer. What I wanna to do is put one script on cron.daily to : 1. Clean all the files on the directories .recyycle(see below) that are older than 15 days. \files\production\.recycle \files\directory\.recycle \files\it_teste\.recycle \files\adm\sandra\.recycle \files\testing\piedro\.recycle \files\system\sources\.recycle \files\system\testing\.recycle \files\system\cvs\.recycle 2. Clean all the files on all the user homes that are older than 7 days. I have +/- 50 users and I wanna to make something automatic, that I don?t need to give maintaince on the script after creating a new user... Ideas? Cheers, Rodrigo Miranda Carvalhaes DBA PostgreSQL joec@aracnet.com wrote:> > Rodrigo, > > Setting up a cron is easy. Do you have any scripting skills? If not, then give me the deatils (time stamps, directories, etc), and I can put something toegether for you in tcsh/bash or whatever. > > Joe > > Rodrigo Carvalhaes <grupos@carvalhaes.net> wrote : > > >>Hi! >> >>I implemented the vfs reclycle and it?s really good! >>Now, I wanna to put on my monthly cron a script to clean old recycles... >> >>Someone have examples to send me ? Tips? >> >>Thanks ! >> >>Cheers >> >>Rodrigo Miranda Carvalhaes >> >>-- >>To unsubscribe from this list go to the following URL and read the >>instructions: http://lists.samba.org/mailman/listinfo/samba > > >
> What I wanna to do is put one script on cron.daily to : > 1. Clean all the files on the directories .recyycle(see below) that are > older than 15 days. > > \files\production\.recycle > \files\directory\.recycle > \files\it_teste\.recycle > \files\adm\sandra\.recycle > \files\testing\piedro\.recycle > \files\system\sources\.recycle > \files\system\testing\.recycle > \files\system\cvs\.recycle > 2. Clean all the files on all the user homes that are older than 7 days. > I have +/- 50 users and I wanna to make something automatic, that I > don?t need to give maintaince on the script after creating a new user... > Ideas?man find
Have you considered using tmpwatch? http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm I use it to delete the files on my TEMP share that are more than 5 days old. It works quite well. -- Chuck Chauvin ---------- Original Message ----------- From: Rodrigo Carvalhaes <grupos@carvalhaes.net> To: samba@lists.samba.org Sent: Thu, 23 Sep 2004 11:43:34 -0300 Subject: Re: [Samba] Script to clean the recycles...> Hi Joe! > > Thanks for your promptly answer. > > What I wanna to do is put one script on cron.daily to : > > 1. Clean all the files on the directories .recyycle(see below) that > are older than 15 days. > > \files\production\.recycle > \files\directory\.recycle > \files\it_teste\.recycle > \files\adm\sandra\.recycle > \files\testing\piedro\.recycle > \files\system\sources\.recycle > \files\system\testing\.recycle > \files\system\cvs\.recycle > > 2. Clean all the files on all the user homes that are older than 7 > days. I have +/- 50 users and I wanna to make something automatic, > that I don?t need to give maintaince on the script after creating a > new user... > > Ideas? > > Cheers, > > Rodrigo Miranda Carvalhaes > DBA PostgreSQL
hi
#!/bin/bash
#delete all files older 7 days in all homes .recycle and its subfolders
find /home/*/.recycle/ -mtime +7 -type f -exec rm "{}" ";"
you can do this by cron in varias share with other paths
Regards
Rodrigo Carvalhaes schrieb:
> Hi Joe!
>
> Thanks for your promptly answer.
>
> What I wanna to do is put one script on cron.daily to :
>
> 1. Clean all the files on the directories .recyycle(see below) that are
> older than 15 days.
>
> \files\production\.recycle
> \files\directory\.recycle
> \files\it_teste\.recycle
> \files\adm\sandra\.recycle
> \files\testing\piedro\.recycle
> \files\system\sources\.recycle
> \files\system\testing\.recycle
> \files\system\cvs\.recycle
>
> 2. Clean all the files on all the user homes that are older than 7 days.
> I have +/- 50 users and I wanna to make something automatic, that I
> don?t need to give maintaince on the script after creating a new user...
>
> Ideas?
>
>
> Cheers,
>
> Rodrigo Miranda Carvalhaes
> DBA PostgreSQL
>
>
> joec@aracnet.com wrote:
>
>>
>> Rodrigo,
>>
>> Setting up a cron is easy. Do you have any scripting skills? If not,
>> then give me the deatils (time stamps, directories, etc), and I can
>> put something toegether for you in tcsh/bash or whatever.
>>
>> Joe
>>
>> Rodrigo Carvalhaes <grupos@carvalhaes.net> wrote :
>>
>>
>>> Hi!
>>>
>>> I implemented the vfs reclycle and it?s really good!
>>> Now, I wanna to put on my monthly cron a script to clean old
recycles...
>>>
>>> Someone have examples to send me ? Tips?
>>>
>>> Thanks !
>>>
>>> Cheers
>>>
>>> Rodrigo Miranda Carvalhaes
>>>
>>> --
>>> To unsubscribe from this list go to the following URL and read the
>>> instructions: http://lists.samba.org/mailman/listinfo/samba
>>
>>
>>
>>
>