I'm new to crontab and would like to run the following script from /etc/crontab
:
0 15 * * * root bash-c 'for i in /home/dell/Downloads/*.{pdf,docx,png,jpg,PDF,DOCX}; do shred -zvu "$i" -n20; done'
I have tried with and without bash-c
option, yet the script doesn't run.
My objective is:
- Get this script running from Crontab
- Get this script running on startup
Help is appreciated.
crontab -e
as userdell
) instead of in the system crontab as root. – marcelm Feb 27 '19 at 14:09