Is there an idiomatic means to detect whether "find" found any matches? I'm currently using
COUNT=`find ... | wc -l` if [ "$COUNT" -gt 0 ]; then
but this seems a little indirect to me. Also, I'd like find to stop searching once it's found a match, so it doesn't waste time and effort. I just need to know whether or not there are any files that match.