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?
CP-rf./files/./bak/CP: Whether to overwrite the "./bak/files/test.txt"CP : Whether to overwrite the "./bak/files/hh.txt"CP: Whether to overwrite "./bak/ Files/child/child.txt"?
Later found to be the problem caused by aliases.
[email protected] test]# AliasaliasCP='cp-i'aliasEgrep='egrep--color=auto'aliasFgrep='Fgrep--color=auto'aliasgrep='grep--color=auto'alias L.='ls-d. *--color=auto'alias LL='ls-l--color=auto'aliasls='ls--color=auto'aliasMV='mv-i'aliasRM='rm-i'aliaswhich='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 FunctionsaliasRM='rm-i'#aliasCP='cp-i'aliasMV='mv-i'# Source Global Definitionsif[-F/ETC/BASHRC]; Then . /etc/BASHRCfi
Let the command take effect:
SOURCE ~/.BASHRC
Or you can disconnect the re-connect.
Linux under CP-RF always prompt overlay solution