Linux CP command exception

Source: Internet
Author: User
Linux general technology-Linux technology and application information. For details, refer to the following section. When using the Linux cp command, copy all the content in a folder to the command directory:

For example: cp-rf ezmlm-idx-0.443/* ezmlm-0.53/

The result reminds me every time to overwrite the file. It's strange!

Later I used it: which cp.

Alias cp = 'cp-I'
/Bin/cp

The original cp is the alias of "cp-I", so the system automatically assumes-I (interaction prompt parameter) when only cp is used for copying each time, so the above problem occurs.

Solution (3 methods)

1. Edit vi ~ /. Bashrc or vi ~ /Profile

Remove the alias cp = 'cp-I 'section.

2. Input prompt before copying

3. Use/bin/cp directly.
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.