I have a shell script to find folders which are 25 days older and delete it, and put the deleted folder details into log file like this
Code:
find /ahome/xxx/$FOLDER -type d -mtime +25 -exec ls -ld {} \; -exec rm -rf {} \; >> mylogfile.log
after running this command it deletes the folder and logs the folder deleted. But also print error msg
Code:
find: /ahome/prksh/dir/test: No such file or directory
How to suppress the error msg