2019-11-11 17:45:03 +0800, Peng Yu:
> Hi,
>
> Sometimes, I'd like to know whether there is nothing found. Is there a
> way to let find return none-zero when nothing is found? Thanks.
[...]
If using -print, you can pipe to grep '^'
if find ... | grep '^'; then
echo "find found something, see li
On 11/11/19 3:45 AM, Peng Yu wrote:
Hi,
Sometimes, I'd like to know whether there is nothing found. Is there a
way to let find return none-zero when nothing is found? Thanks.
Not built in to find directly, but you can emulate it via a number of
means, such as having find touch a witness file
Hi,
Sometimes, I'd like to know whether there is nothing found. Is there a
way to let find return none-zero when nothing is found? Thanks.
--
Regards,
Peng