10-xargs 简明笔记

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

xargs     [options

 

选项

-n                                               数字,分组

 

示例

xargs 

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

 

显示文件信息

 

xargs -n

 1 [root@28 ~]# ls |xargs  -n 5
 2 anaconda-ks.cfg dir dir3 dir5 file
 3 file3 file5 install.log install.log.syslog oldboy
 4 person.txt umask_test umask_test.txt
 5 [root@28 ~]# ls |xargs  -n 3
 6 anaconda-ks.cfg dir dir3
 7 dir5 file file3
 8 file5 install.log install.log.syslog
 9 oldboy person.txt umask_test
10 umask_test.txt

 

显示文件系统信息

posted @ 2016-12-17 12:42  活的潇洒80  阅读(225)  评论(0编辑  收藏  举报