10-xargs 简明笔记

时间:2023-03-09 21:21:45
10-xargs 简明笔记

从标准你输入获取内容创建和执行命令

xargs     [options]

选项

-n                                               数字,分组

示例

xargs

 [root@ ~]# ls |xargs
anaconda-ks.cfg dir dir3 dir5 file file3 file5 install.log install.log.syslog oldboy person.txt umask_test umask_test.txt

显示文件信息

xargs -n

 [root@ ~]# ls |xargs  -n
anaconda-ks.cfg dir dir3 dir5 file
file3 file5 install.log install.log.syslog oldboy
person.txt umask_test umask_test.txt
[root@ ~]# ls |xargs -n
anaconda-ks.cfg dir dir3
dir5 file file3
file5 install.log install.log.syslog
oldboy person.txt umask_test
umask_test.txt

显示文件系统信息