Old boy Education Daily-May 7, 2017-snack-linux below how to implement, execute the RM command, display does not the use RM commands

Source: Internet
Author: User
Tags aliases

1. Title-old boy Education daily-May 7, 2017-snack-linux below how to implement, execute the RM command, display does not the use RM command2. Required Results
[[Email protected] ~]# RM do not use RM command
3. Answer
This requires the use of aliases in Linux alias rm= ' echo do not use RM command ' NOTE: The above command will also be put into/etc/profile for permanent entry
4. Detailed process first milestone-How to display this line of text
[[email protected] data]# echo do not use RM commanddo not use RM command
Second milestone-Configuring aliases
• Aliases for imitation systems · [[email protected] data]# alias Cpalias cp= ' cp-i ' [[email protected] data]# alias rm= ' echo do not use RM command '
A third milestone-testing
[[Email protected] data]# RM do not use RM command[[email protected] data]# Rm/datado not use RM command/data[[email PR Otected] data]# Rm-rf/datado not use RM command-rf/data
Fourth milestone-Make an alias permanent-/etc/profile
[[email protected] data]# vim/etc/profile[[email protected] data]# #vim/etc/profile[[email protected] data]# #vim/etc/p Rofile G to the last line of the file [[email protected] data]# # O (Small letter O) Insert a row below the current line and enter edit mode [[email protected] data]# [[email protected] data] # tail-1/etc/profilealias rm= ' echo do not use RM command ' [[email protected] data]# [[email protected] data]#
Fifth Milestone-Allow alias configuration to take effect
Use source or re-login [[email protected] data]# Source/etc/profile
Sixth milestone-Drainage pits

Re-login you, should be surprised to find that the RM alias does not take effect, in fact, if you configure the RM,CP,MV alias, there will be non-effective issues.

[Email protected] ~]# CAT/ROOT/.BASHRC # bashrc# User specific aliases and Functions#alias rm= ' rm-i ' # # #注释掉rm的这一行, plus  The two lines of CP and MV can retain alias cp= ' cp-i ' Alias mv= ' mv-i ' # Source global definitionsif [-F/ETC/BASHRC]; Then. /etc/bashrcfi
5. Statistical information

Today is the 44th Day of the day to accompany you and look forward to your progress .

For questions and answers, please leave a comment in the blog comments section .
Index of the topic of the previous period

http://lidao.blog.51cto.com/3388056/1914205

This article is from the "Lee blog" blog, make sure to keep this source http://lidao.blog.51cto.com/3388056/1922923

Old boy Education Daily-May 7, 2017-snack-linux below how to implement, execute the RM command, display does not the use RM commands

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.