I want to delete .txt files in specific folder, which I succeed from the command line:
However, the command does not work from cron, despite using absolute paths:
I tested also with -print instead of -delete, redirecting output to a file, but it does not work either and created file is empty:
Any advices?
Code:
/usr/bin/find /path/to/ -name "*.txt" -delete
However, the command does not work from cron, despite using absolute paths:
Code:
@daily /usr/bin/find /path/to/ -name "*.txt" -delete > /dev/null 2&>1
I tested also with -print instead of -delete, redirecting output to a file, but it does not work either and created file is empty:
Code:
@daily /usr/bin/find /path/to/ -name "*.txt" -print > /home/me/test.txt 2&>1
Any advices?