This always send an email whether or not any files are found that were created in the last 10 minutes. I want it to only send an email if it finds a file created in the last 10 minutes.
This works but it's probably sloppy and the only way so far I could do it (OK I'm new)
# find files created in last 10 minutes and, if found, email an alert
#!/bin/sh
find /home/folder -cmin -10 >test.txt #find files created in last 10 minutes and output to test.txt
then
if [ -s /folder/folder/test.txt ] # is text.txt > 0?