Reputation: 103
find -name '*.jpg' -print0 | xargs -0 qiv
qiv **/*.jpg
both are safely escaped and delivered to qiv
?
Upvotes: 0
Views: 27
Reputation: 799440
Yes. In the first case, find
is expanding the wildcard internally, and delivering results to xargs
as it expects them. In the second, the shell is expanding them and passing each match as a separate argument. Both are correct (assuming shell support for **
, and that the command line length maximum isn't exceeded).
Upvotes: 1