How to use the CP \ Alias \unalias for Linux (chapter sixth)

Source: Internet
Author: User
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.