Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
find -name '*.jpg' -print0 | xargs -0 qiv
qiv **/*.jpg
两者都安全逃脱并交付给qiv?
qiv
是的。在第一种情况下,find在内部扩展通配符,并按xargs预期交付结果。在第二个中,shell 正在扩展它们并将每个匹配项作为单独的参数传递。两者都是正确的(假设 shell 支持**,并且不超过命令行长度最大值)。
find
xargs
**