2011年3月15日 星期二

Fedora/Linux: cp為何一直出現 overwrite ?

以前有學過,但我忘了.
man cp 不會提到--reply=yes
於是google 找到以下的資料,當做我的筆記.
-----------

Fedora/Linux: cp為何一直出現 overwrite ?
實際情況:
在Fedora 4中
#cp 1 2
cp: overwrite '2'?
就算用 -f force也是出現overwrite ?

原因:
cp預設被 alias cp='cp -i'
因為 -i是interactive
解決方法:
所以建議指定/bin/cp 1 2或
cp 1 2 --reply=yes
-------
> $ alias
> (to see what alias it might have, if any)
>
> $ unalias cp
> (to remove said alias)
>
> $ help alias
> (for info on how to use alias via bash)

沒有留言:

AI 待觀察素材

UI UX Pro Max Design Intelligence https://www.uupm.cc/ 如何做出你的AI員工-網路版 上課簡報 https://www.4rich.org/ai/how2ai-v8.html