Carlos A. P. Cunha via samba wrote:> For me, is "magic line" > > find $DEST -depth -mtime +$DAYS -print -delete---- I'm guessing you probably want 'ctime' there. If you use mtime, then it will be deleted "ndays" after the last modification date on the file -- NOT the time the file was moved into the recycle bin. If you use ctime - that appears to update when the file is moved into a different directory (the recycle bin) -- allowing things to expire some number of days after it is "recycled".
No, is correct "mtime", but forget information add two line in smb,conf..... recycle:touch = yes recycle:touch_mtime = yes :-D Em 07-09-2017 15:17, L A Walsh escreveu:> Carlos A. P. Cunha via samba wrote: >> For me, is "magic line" >> >> find $DEST -depth -mtime +$DAYS -print -delete > ---- > I'm guessing you probably want 'ctime' there. > > If you use mtime, then it will be deleted "ndays" after > the last modification date on the file -- NOT the time the file > was moved into the recycle bin. > > If you use ctime - that appears to update when the file > is moved into a different directory (the recycle bin) -- allowing > things to expire some number of days after it is "recycled". >
Clever, however, that modifies the metadata of the user's file. If the user restores the file from the recycle-bin, it seems the file's original modify time would not be restored (or it's handled by another setting I don't know about.. :-) ). If the original modify time isn't restored, and the modify time was used by something like 'make' to determine whether or not to rebuild something, the user might get an unanticipated rebuild next time they did a make. Probably not a problem, but if one was paranoid one might wonder about unforeseen consequences... (just because you are paranoid doesn't mean they are not "out to get you"...) :-) Carlos A. P. Cunha wrote:> No, is correct "mtime", but forget information add two line in > smb,conf..... > > recycle:touch = yes > recycle:touch_mtime = yes > > :-D > > Em 07-09-2017 15:17, L A Walsh escreveu: >> Carlos A. P. Cunha via samba wrote: >>> find $DEST -depth -mtime +$DAYS -print -delete >> ---- >> ...[ctime vs. mtime comparison]... >