Now, if there are files in , its ok. But if there are no files in , the above command throws a ticket with an alert that the command failed.I have tried modifying the command in various ways--one such attempt is listed below--but that fails as well.

NN NN * * * [ $(ls -1A | wc -l) != 0 ] && find .....

So, I try to count if there are files in before I run the find and yet I get the error that "ls -1A etc" has failed.

Is there a way to insulate commands in cron so that if there are no files to operate on, the command should just go away? Basically, if there are no files in , it is not an error --from Oracle point-of-view.