I tried this:
find /usr/lib -print0 | grep zip | xargs -0 -I{} echo "found file: {}"
find /usr/lib -print0 | grep --null zip | xargs -0 -I{} echo "found file: {}"
But it doesn't work because grep only says there is a binary file matching. I want grep to output null terminated lines.
Is it possible to fix this without changing the whole command? I know it's possible to use find -name ... -exec ...
. But it would be nice if my existing command could be fixed instead.
fdfind
, I find it much easier to use... excuse the pun. – a2k42 Mar 08 '23 at 09:49