A puzzle! Crontab and mkdir and files, oh my!

Ian Bruntlett ian.bruntlett at gmail.com
Thu Apr 24 12:04:35 UTC 2025


Hi,

On Thu, 24 Apr 2025 at 12:51, Ralf Mardorf via ubuntu-users <
ubuntu-users at lists.ubuntu.com> wrote:

> So it should read
>
> 0 1 * * * username find /home/ubuntu/data -type d -name '*_temp*' -exec rm
> -r {} >> /home/ubuntu/data/log/adfd_cleanup.log 2>&1
>

I don't use cron but if I did, I would seriously consider putting the
lengthy find command into a shell script and call the shell script from
cron.

Or am I missing something here?

TIA,


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://github.com/ian-bruntlett/TECH-Manuals/blob/main/tm-free-software.md
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20250424/5a765ede/attachment.html>


More information about the ubuntu-users mailing list