Typically, when you use CP-RF to manage files or folders, you are generally no longer reminded of overwriting. However, the use of CP-RF on a single machine in the intranet indicates whether or not to overwrite. Is it different from the usual commands?
[Email protected] test]# cp-rf/files/./bak/
CP: Do you want to overwrite "./bak/files/test.txt"?
CP: Do you want to overwrite "./bak/files/hh.txt"?
CP: Do you want to overwrite ". Www.1.qixoo.com/bak/files/child/child.txt"?
Later found to be the problem caused by aliases.
[[email protected] test]# alias
Alias cp= ' Cp-i '
Alias egrep= ' Egrep--color=auto '
Alias fgrep= ' Fgrep--color=auto '
Alias grep= ' grep--color=auto '
Alias l.= ' ls-d. *--color=auto '
Alias ll= ' Ls-l--color=auto '
Alias ls= ' ls--color=auto '
Alias mv= ' Mv-i '
Alias rm= ' Rm-i '
Alias Which= ' Alias | /usr/bin/which--tty-only--read-alias--show-dot--show-tilde '
Each time the CP command is executed, the cp-i command is executed with an alias, so no matter how the input is prompted for overwrite.
To modify ~/.BASHRC, add the # comment before "alias cp= ' Cp-i '".
[Email protected] test]# VI ~/.BASHRC
#. BASHRC
# User specific aliases and functions
Alias rm= ' Rm-i '
#alias cp= ' Cp-i '
Alias mv= ' Mv-i '
# Source Global Definitions
if [-F/ETC/BASHRC]; Then
. /etc/bashrc
Fi
Let the command take effect:
SOURCE ~/.BASHRC
or reboot.
Linux under CP-RF always prompt overlay solution
Linux under CP-RF always prompt overlay solution