The find supposecommand is supposed to return several files, hence the warning you see.
If you want check one file, it would be better to use stat
file_btime=$(stat -c%W /var/opt/test/maintenancelock/testLOCK) time_now=$(date %s) file_age=$(( time_now - file_btime )) if [ $file_age -le 86400]86400 ] ; then echo File is less then 24h old fi