xargs 是一个强有力的命令,它能够捕获一个命令的输出,然后传递给另外一个命令。之所以能用到这个命令,关键是由于很多命令不支持|管道来传递参数,而日常工作中有有这个必要,所以就有了 xargs 命令,例如:
find /sbin -perm +700 |ls -l #这个命令是错误的 find /sbin -perm +700 |xargs ls -l #这样才是正确的
xargs 一般是和管道一起使用。
xargs 是一个强有力的命令,它能够捕获一个命令的输出,然后传递给另外一个命令。之所以能用到这个命令,关键是由于很多命令不支持|管道来传递参数,而日常工作中有有这个必要,所以就有了 xargs 命令,例如:
find /sbin -perm +700 |ls -l #这个命令是错误的 find /sbin -perm +700 |xargs ls -l #这样才是正确的
xargs 一般是和管道一起使用。
转载于:https://www.cnblogs.com/hyp-19871112/p/9921262.html