How to use CP \ Alias \unalias
CP command
1. Copy all files and folders from the entire/root/desktop directory to the/tmp directory
[[email protected] ~]# cp -r Desktop/ /tmp/
2. Copy the Test.txt file under the/root directory to the/tmp/directory (note that the Test.txt file already exists in the directory) and we need to overwrite the information without any hint.
[[email protected] ~]# cp test.txt /tmp/ #正常情况下有提示cp: overwrite `/tmp/test.txt‘? y
[[email protected] ~]# \cp test.txt /tmp/
#反斜杜后就没有任何提示
Cause Analysis:
Because the system comes with the CP command, the alias is forced to add the-I confirmation parameter, we only need to use the anti-skew du, or the absolute path of the command can be run, as follows:
[[email protected] ~]# 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 net=‘cat /etc/sysconfig/network-scripts/ifcfg-eth2‘alias rm=‘rm -i‘alias which=‘alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde‘
How to use the CP \ Alias \unalias for Linux (chapter sixth)