how to enable find command to print exe status diff from 0 when find command not find the file?
according to my example when I try to find the test1.txt file , $? set to 0 but I expect to get value diff from 0 because the file not found
[root@om-1 tmp]# touch test.txt [root@om-1 tmp]# find /var/tmp -name test.txt /var/tmp/test.txt [root@om-1 tmp]# echo $? 0 [root@om-1 tmp]# find /var/tmp -name test1.txt (test1.txt not under /var/tmp) [root@om-1 tmp]# echo $? 0