Hi, I'm manually running below commands to delete files from some directories. Can anyone please help me to automate the script and also let me know how to schedule it in unix crontab. It'll run every alternative day at 6 PM.
crontab -l list. crontab -e edit with default editor. EDITOR=nano crontab -e edit with nano . (crontab -l; echo '2 18 * * 0,2,4,6 find /tempr/DSC/PH[123]* \! -type d -mtime +3 -exec rm -f {} +') | crontab add a new crontab line from the command line (or in a shell script). Some crontab versions need crontab - .