4918
5880
3万
GROAD
曲径通幽,安觅芳踪。
cat temp.txt welcome to groad
cat temp.txt |xargs welcome to groad
# cat temp.txt 1 2 3 4 5 6 7 8 9 10 11 12 13
# cat temp.txt |xargs -n 3 1 2 3 4 5 6 7 8 9 10 11 12 13
# cat temp.txt welcome~to~www~groad~net
# cat temp.txt |xargs -d '~' welcome to www groad net
# cat temp.txt |xargs -d '~' -n 2 welcome to www groad net
./mysc.sh -s yourarg -p
$ cat myarg.txt | xargs -I {} ./mysc.sh -s {} -p
$ find . -name "core" -print | xargs echo "" >/tmp/core.log
$ find /apps/audit -perm -7 -print | xargs chmod o-w 在下面的例子中,我们用 grep 命令在所有的普通文件中搜索 device 这个词: [quote]$ find / -type f -print | xargs grep "device"
$ find . -name \* -type f -print | xargs grep "DBO"
# ls -l total 0 -rw-r--r-- 1 root root 0 2012-03-23 13:59 groad.txt -rw-r--r-- 1 root root 0 2012-03-23 13:59 hello groad.txt # find . -type f -name "*.txt" -print | xargs rm -f # ls -l total 0 -rw-r--r-- 1 root root 0 2012-03-23 13:59 hello groad.txt
# find . -name "*.txt" -print0 |xargs -0 rm -f
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )
GMT+8, 2025-6-18 07:29 , Processed in 0.081385 second(s), 22 queries .
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.