[TriLUG] `find -delete` not deleting

Roger via TriLUG trilug at trilug.org
Tue Sep 6 14:23:00 EDT 2016


man anacron
--
Roger Broseus

(Please excuse tiepos induzed by the droided predictive text tool.)

On September 6, 2016 2:15:53 PM EDT, Aaron Morrison via TriLUG <trilug at trilug.org> wrote:
>
>> On Sep 6, 2016, at 13:03, Steve Litt via TriLUG <trilug at trilug.org>
>wrote:
>> 
>> 
>> 
>> Why are you using find? Your directories are already named for
>> datestamps. Just have the cron job's shellscript calculate 7 days
>> ago (let's say 8/27/2016), then do rm -rf whatever/20160827.
>> 
>> SteveT
>> 
>
>So what if cron misses its trigger?  E.g. On a laptop that is off or
>sleeping? If so then this will miss removing that week old directory
>and no subsequent cron execution will remove it either. (I'll grant
>that some cron implementations try to recognize missed triggers and
>those may work)
>
>The find method will recover from that case and in fact may be more
>flexible if the conditions change. ( only want to remove symlinks? No
>problem.  )
>
>--am
>
>> Steve Litt 
>> September 2016 featured book: Twenty Eight Tales of Troubleshooting
>> http://www.troubleshooters.com/28
>> 
>> 
>> -- 
>
>-- 
>This message was sent to: Roger <rogerb at bronord.com>
>To unsubscribe, send a blank message to trilug-leave at trilug.org from
>that address.
>TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>Unsubscribe or edit options on the web	:
>http://www.trilug.org/mailman/options/trilug/rogerb%40bronord.com
>Welcome to TriLUG: http://trilug.org/welcome


More information about the TriLUG mailing list