I am using MacOS, so that means BSD linux. The problem is I pipe results of find into rmlint, and the filtering criterion is ignored.
find . -type f -iname '.png' | rmlint -xbgev
This command will pipe all files in current directory into rmlint -- both PNGs and non-PNGs.
If I pipe the selected files to ls, I get the same thing -- PNGs and non-PNGs.
When I use exec
find . -type f -iname '.png' -exec echo {} ;
This works to echo only PNGs, filtering out non-PNGs.
But if I pipe the results of exec, I get the same problem -- both PNGs and non-PNGs.
find . -type f -iname '*.png' -exec echo {} ; | ls
This is hard to believe, but that's what happened.
Anybody have suggestions?
I am deduplicating millions of files on a 14TB drive. Using MacOS Monterey on a 2015 iMac.
Thanks in advance
PS I just realized by ubuntu is doing the same thing -- failing to filter by given criteria