Linux under CP-RF always prompt overlay solution

Source: Internet
Author: User
Tags aliases egrep

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?

[Email protected] test]# cp-rf/files/./bak/

CP: Do you want to overwrite "./bak/files/test.txt"?

CP: Do you want to overwrite "./bak/files/hh.txt"?

CP: Do you want to overwrite ". Www.1.qixoo.com/bak/files/child/child.txt"?


Later found to be the problem caused by aliases.

[[email protected] test]# alias

Alias cp= ' Cp-i '

Alias egrep= ' Egrep--color=auto '

Alias fgrep= ' Fgrep--color=auto '

Alias grep= ' grep--color=auto '

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 '


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 functions


Alias rm= ' Rm-i '

#alias cp= ' Cp-i '

Alias mv= ' Mv-i '


# Source Global Definitions

if [-F/ETC/BASHRC]; Then

. /etc/bashrc

Fi


Let the command take effect:

SOURCE ~/.BASHRC


or reboot.


Linux under CP-RF always prompt overlay solution

Linux under CP-RF always prompt overlay solution

Related Article

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.