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

Eyal Lebedinsky eyal at eyal.emu.id.au
Thu Apr 24 12:12:37 UTC 2025


On 24/4/25 22:04, Ian Bruntlett wrote:
> Hi,
> 
> On Thu, 24 Apr 2025 at 12:51, Ralf Mardorf via ubuntu-users <ubuntu-users at lists.ubuntu.com <mailto: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.

Absolutely.

> Or am I missing something here?

You are only missing the entertainment value of this thread.

> TIA,
> 
> 
> Ian

-- 
Eyal at Home (eyal at eyal.emu.id.au)



More information about the ubuntu-users mailing list