Jam*_* Ko 6 options xargs history
我最近正在阅读Linux 手册页xargs
,似乎该-i
选项已被弃用。从文档中引用:
-i[replace-str], --replace[=replace-str]
This option is a synonym for -Ireplace-str if replace-str is
specified. If the replace-str argument is missing, the effect
is the same as -I{}. This option is deprecated; use -I
instead.
Run Code Online (Sandbox Code Playgroud)
只是好奇,为什么它被弃用了?使用更冗长的-I{}
语法的原因是什么?
muru是对的,如果您检查更新findutil
日志@line 1645
- 4.2.9 版的主要变化,2004-12-05
xargs
现在支持 POSIX 选项-E
,-I
和-L
. 这些都为现有选项同义词-e
,-i
和-l
,但现在的后三个已被弃用。
man
页面上也有说明,看-l
选项:
The -l option is deprecated since the POSIX standard specifies -L instead.
并进一步向下:
The -l and -i options appear in the 1997 version of the POSIX
standard, but do not appear in the 2004 version of the standard.
Therefore you should use -L and -I instead, respectively.
Run Code Online (Sandbox Code Playgroud)