customizing commands with the alias alias

Source: Internet
Author: User
Tags aliases

Usually in the development of the use of a number of command lines, in order to save time (lazy), the following describes the use of alias Mac/linux under the common commands. Alias View all command aliases Unalias aliases remove aliases alias ll= ' ls-l ' ll total 24
-rwxr-xr-x 1 Cicilover staff 6 2016 directhello.py
-rw-r--r--1 Cicilover staff 6 2016 input&output.py
Drwxr-xr-x 3 Cicilover Staff 102 8 00:36 Pythontokaggle
-rw-r--r--1 Cicilover Staff 703 3 00:18 tkinter.py alias alias Ll= ' Ls-l '
Alias mv= ' mv-i ' Alias rm= ' rm-i ' Alias cp= ' cp-i ' provides a dialog that prompts you to do some high-risk actions when you modify the default command, and you can also customize the commonly used commands by using aliases.
This method, which is set with the command line, does not take effect after the reboot. Vim ~/.BASHRC writes the corresponding alias, it can be applied permanently. The other file is readonly input: Set NOREADONLY+:WQ or: wq! save
After saving the file, run: source ~/.BASHRC
If not, the description does not ~/.bash_profile or the file does not execute ~/.BASHRC open the file, add one line: Source ~/.BASHRC

Order in which the order is in effect: 1. Execute an absolute or relative path 2. Execute alias 3. Execute bash's internal command 4. Executes the first command found in the directory lookup order defined by the $PATH environment variable

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.