Avoding the ERROR message while using find,move commands

Hi All,

We just need to move a set files to a Archive location and then delete the files older than 1 day.

I used the below commands respectively.

When the file exist it is working. But when the file doesnt exist, in the ouptput log file it is showing "NO MATCH". How to avoid this in the output log file as it seems to be sort of error message.

mv ${LOG_HOME}/cust_delete*.out  $ARCH_LOG_HOME
 
find ${ARCH_LOG_HOME} -type f -name "cust_delete*.out" -mtime +1 -exec rm {} \;

You can redirect STDERR to the bucket with adding the following at the end of the same line that gives you the error:

2> /dev/null

The line with find should give no error - you can also just check if the file exists and only then do the mv .