Found in Fedora 10/ubutun with cp-fr src dest, even if the addition of-F can not be forced to cover, then what's going on. One or two file is OK say, lose a few yes, but if n multiple files how to do, that still don't lose the dead. There are three solutions available below. Method One
We enter the alias command to see what alias the system has to the CP.
[Root@localhost ~]# Alias
Alias cp= ' Cp-i '
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 '
Then [Root@localhost ~]# Mans CP
Let's see what I mean.
-i,–interactive Prompt before overwrite
Before the cover will be prompted, then our solution is also out, with Unalias CP to remove CP alias, restore pure CP.
[root@localhost ~] #unaslias CP (This is a temporary cancellation of CP alias, not permanent)
[root@localhost ~] #cp-fr src dest The next line, will not be prompted to overwrite. Method Two
Enter the \CP command, which also cancels the CP alias.
[root@localhost ~]#\cp-fr src dest Method III
Enter YES|CP-FR src dest and use the pipe to automatically enter Yes.
[root@localhost ~] #yes | CP cp-fr SRC dest let the pipeline automatically enter a large pile of yes, you can complete the forced replication.
that someone will ask how the DOS copy command to implement the forced copy. The answer is
used to xcopy/y src dest for forced replication.