You can do yes | cp -rf xxx yyy
(你可以做yes | cp -rf xxx yyy
)
yes | cp -rf xxx yyy
, but my gutfeeling says that if you do it as root - your .bashrc
or .profile
has an alias of cp
to cp -i
, most modern systems (primarily RH-derivatives) do that to root profiles. (yes | cp -rf xxx yyy
,但我的gutfeeling说,如果你以root身份执行 - 你的.bashrc
或.profile
的别名是cp
到cp -i
,大多数现代系统(主要是RH衍生系统)都是根配置文件。)
You can check existing aliases by running alias
at the command prompt, or which cp
to check aliases only for cp
.
(您可以通过在命令提示符下运行alias
来检查现有别名,或者which cp
来检查仅为cp
别名。)
If you do have an alias defined, running unalias cp
will abolish that for the current session, otherwise you can just remove it from your shell profile.
(如果您确实定义了别名,则运行unalias cp
将取消当前会话的unalias cp
,否则您只需将其从shell配置文件中删除即可。)
You can temporarily bypass an alias and use the non-aliased version of a command by prefixing it with \
, eg \cp whatever
(您可以暂时绕过别名并使用命名的非别名版本,前缀为\
,例如\cp whatever
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…