When a new server is deployed, No matter what parameter-f is added or whether the request is overwritten, this is intolerable when a large number of cp overwriting operations are performed.
Copy the files under directory a to directory B
The following is a code snippet:
Cp-r a/* B
When executing the preceding command, each file in B will prompt whether to overwrite it;
The following is a code snippet:
Cp-r-f a/* B
When executing the preceding command, every file in B will no longer be prompted;
This is our desired ideal state, but sometimes-f is added. Why do we still have a prompt? Some servers Add the alias cp = cp-I by default. When you execute cp, the actual execution is cp-I.
Execute alias on the terminal.
The following is a code snippet:
[Root @ devdb ~] # Alias
Alias cp = cp-I
Yes
The following is a code snippet:
[Root @ devdb ~] # Vi ~ /. Bashrc
Add "#" before alias cp = cp-I to comment out this line: wq! Save the launch and log on again.