cp 覆盖不提示

2021-10-08  本文已影响0人  偷油考拉
  1. unalias cp
    修改.bashrc中的alias也行

  2. \cp

[root@VM-99-33-centos opt]# \cp 1/test 2/test 
[root@VM-99-33-centos opt]# cat 2/test 
test1
  1. yes | cp -rf xxx yyy
    写脚本推荐
[root@VM-99-33-centos opt]# yes | cp 1/test 2/test 
cp: overwrite ‘2/test’? [root@VM-99-33-centos opt]# 
[root@VM-99-33-centos opt]# 
[root@VM-99-33-centos opt]# cat 2/test 
test1
上一篇 下一篇

猜你喜欢

热点阅读