xargs -i和-I的区别【转】
Replace occurrences of replace-str in the initial-arguments with names read from standard input. Also,
unquoted blanks do not terminate
input items; instead the separator is the newline character. Implies -x and -L 1.
--replace[=replace-str], -i[replace-str]
This option is a synonym for -Ireplace-str if replace-str
is specified, and for -I{} otherwise. This option is deprecated; use -I instead.
1kk.zip 3kk.zip 5kk.zip b.rar d.rar f.rar h.rar j.rar mini.txt ni.txt
2kk.zip 4kk.zip a.rar c.rar e.rar g.rar i.rar k.rar nii.txt
[root@test05 ab]# find . -type f -name "*.txt" | xargs -i
cp {} /tmp/k/
[root@test05 ab]# ls ../k/
mini.txt nii.txt ni.txt
[root@test05 ab]#
[root@test05 ab]# find . -type f -name "*.txt" | xargs -I {} cp {} /tmp/n/
[root@test05 ab]# ls ../n/
mini.txt nii.txt ni.txt
加 -I 参数 需要事先指定替换字符
转自
xargs的i参数 - CSDN博客 https://blog.csdn.net/luojiafei/article/details/7213489
xargs -i和-I的区别【转】的更多相关文章
- [Linux] xargs 和 管道符的区别
今天刚好遇到需要使用xargs的情况,就来研究一下xargs 和 管道符的区别 举几个例子,下面两个语句执行后的结果是什么呢? 1. zhang$ find . -name "*.prope ...
- xargs、管道、exec区别
作者:ilexwg链接:https://www.zhihu.com/question/27452459/answer/170834758来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转 ...
- xargs -i 和-I 的区别【转】
xargs与find经常结合来进行文件操作,平时删日志的时候只是习惯的去删除,比如 # find . -type f -name "*.log" | xargs rm -rf * ...
- 老男孩IT教育-每日一题汇总
老男孩IT教育-每日一题汇总 第几天 第几周 日期 快速访问链接 第123天 第二十五周 2017年8月25日 出现Swap file….already exists以下错误如何解决? 第122天 2 ...
- 01-Linux命令基础-第01天(命令基础,软件安装与卸载、磁盘管理)
01- Linux初步 最早一直是单道程序设计模型的操作系统 69年贝尔实验室决定开发多道程序设计模型的操作系统 Multics计划 (失败了) x86 IA(Intel Architecture ...
- 管道命令和xargs的区别(经典解释)
一直弄不懂,管道不就是把前一个命令的结果作为参数给下一个命令吗,那在 | 后面加不加xargs有什么区别 NewUserFF 写道: 懒蜗牛Gentoo 写道: 管道是实现"将前面的标准输出 ...
- 关于 ‘--exec’ 参数( find 命令)及介绍 ‘xargs ’命令区别(新版)
前言: find 命令一直都是系统管理员的常用命令之一, 其参数中 "-exec" 尤其实用.而 "xargs" 命令,针对查询也有属于自己的见解.本文着重讲解 ...
- -exec 与 xargs 的区别
实地在shell里执行下如下命令就知道区别了: $ find -type f -exec echo {} \; 很明显,exec是对每个找到的文件执行一次命令.从这里可以看出exec的缺点是每处理一个 ...
- exec与xargs区别
区别描述: 两者都是对符合条件的文件执行所给的Linux 命令,而不询问用户是否需要执行该命令. -exec:{}表示命令的参数即为所找到的文件,以:表示comman命令的结束.\是转义符,因为分号在 ...
随机推荐
- Android 判断是否有声音在播放
在Android中,我们可以通过AudioManager来判断是否有声音在播放. 实例1: 源码地址: PhoneWindowManager.java (frameworks\base\policy\ ...
- pandas 从入门到遗忘
读取大文件(内存有限): import pandas as pd reader = pd.read_csv("tap_fun_test.csv", sep=',', iterato ...
- apk的安装删除
1,签名: java -jar signapk.jar platform.x509.pem platform.pk8 DownloadProvider.apk DownloadProvider-sig ...
- 洛谷P2668 斗地主
好,终于搞完了这一道毒瘤题...... 先想到搜索,然后想到状压,发现数据组数很多,又是随机,还是决定用搜索. 先搜出的多的,于是顺序是三个顺子,然后按照多到少搜带牌,最后是不带牌. 大体思路很简单, ...
- javascript面向对象精要第四章构造函数和原型对象整理精要
- word中批量修改图片大小的两个方法
前言: 对于把ppt的内容拷贝到word中: 对ppt的一页进行复制,然后粘贴到word中 如果要的是ppt运行过程中的内容,在qq运行的情况下,按Ctrl+Alt+A截屏,按勾,然后可以直接粘贴到w ...
- Druid数据源对数据库访问密码加密好麻烦
开发中,druid数据源对数据库密码进行了加密,每次切换数据库或者修改密码后,感觉很麻烦. 解决办法: 1.用工具类中的Java代码进行加解密. 需要用到com.alibaba.druid.filte ...
- Codeforce Div-3 E.Cyclic Components
You are given an undirected graph consisting of nn vertices and mm edges. Your task is to find the n ...
- #define 多行多语句
#define DEBUG_ENABLE 1 #if DEBUG_ENABLE > 0 #define DEBUG_PORT UART_PORT2 #define DBG_BUF_LEN 512 ...
- ruby计算完成率
task_complete = ((task_forms_w.to_f / task_forms_num.to_f)*100).round(2).to_s << "%" ...