xargs中的参数位置

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 的问题

posted on 2010-10-10 18:19  lbsx  阅读(2787)  评论(0编辑  收藏  举报