linux强制覆盖文件的方法
Linux下默认cp命令是有别名(alias cp=‘cp -i’)的,无法强制覆盖1、使用\cp执行cp命令时不走alias[root@k8smaster01 ~]# \cp test1.log test2.log2、使用管道[root@k8smaster01 ~]# yes | cp test1.log test2.log3、取消cp的alias[root@k8smaster01 ~]# un
·
Linux下默认cp命令是有别名(alias cp=‘cp -i’)的,无法强制覆盖
1、使用\cp执行cp命令时不走alias
[root@k8smaster01 ~]# \cp test1.log test2.log
2、使用管道
[root@k8smaster01 ~]# yes | cp test1.log test2.log
3、取消cp的alias
[root@k8smaster01 ~]# unalias cp
[root@k8smaster01 ~]# cp test1.log test2.log
更多推荐
已为社区贡献24条内容
所有评论(0)