首页 > 技术文章 > AIX - How to force cp to overwrite without confirmation

kakaisgood 2020-05-18 16:56 原文

This is probably caused by cp being already aliased to something like cp -i. Calling cp directly should work:

/bin/cp -rf /zzz/zzz/* /xxx/xxx

Another way to get around this is to use the yes command:

yes | cp -rf /zzz/zzz/* /xxx/xxx

推荐阅读