我发现xargs结合其他命令,貌似并不是单纯的运行子命令
比如find -name "*.html" |xargs ls -lctr
它会把查出的文件排序
find -name "*.html"|xargs wc
它会把查出的文件行数、字节数进行总数统计
我之前一直以为它只是单纯执行一下子命令。
----------
哦,man了一下明白了,原来我以前搞错了,它是把输入全部拼到命令里,直到一个上限,达到上限就拼下一个命令。
The command line for command is built up until it reaches a system-defined limit (unless the -n and -L options are used). The specified command will be invoked as many times as necessary to use up the list of input items. In general, there will be many fewer invocations of command than there were items in the input. This will normally have significant performance benefits. Some commands can usefully be executed in parallel too; see the -P option.
--
修改:nabice FROM 220.181.41.*
FROM 220.181.41.*