xargs中的参数位置

此生再无相见时 提交于 2020-03-08 05:41:16

find . -size +50M -print0 | xargs -0 -I {} cp {} largefolder/

 

使用-I参数,后面跟的符号表明用该符号替代find传递过来的值。

 

man xargs

-I replace-str
              Replace occurrences of replace-str in the initial-arguments with
              names read from standard input.  Also, unquoted  blanks  do  not
              terminate  input  items;  instead  the  separator is the newline
              character.  Implies -x and -L 1.

 

参考:

find pwd grep cp xargs组合

xargs cp 的问题

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!