A puzzle! Crontab and mkdir and files, oh my!
Karl Auer
kauer at biplane.com.au
Thu Apr 24 04:16:14 UTC 2025
On Thu, 2025-04-24 at 14:01 +1000, Karl Auer wrote:
> This is a crontab entry. I've broken it up over several lines for
> clarity, but it's all one line in the crontab.
>
> The first line is just saying "do this every day at 01:00".
>
> The second line locates and deletes directories matching "*_temp*.
>
> But what is going on in the last line?
>
> 0 1 * * *
> find /home/ubuntu/data -type d -name '*_temp*' -exec rm -r {} +
> > mkdir /home/ubuntu/data/log/adfd_cleanup.log 2>&1
>
> Please - no theories! If you know, you know. And I don't know!
Now I do know.
I'll wait to tell you more in case the people that like a puzzle want
to have a go at figuring it out. But I will leave a hint: The crontab
line as a whole is badly broken.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au, he/him)
http://www.biplane.com.au/kauer
More information about the ubuntu-users
mailing list