The alias commands in Linux really like the customized features of Linux, but I didn't expect that even commands could be DIY ~!~!

Source: Internet
Author: User

 

 

In the process of using Linux, we need to follow some parameters after each command. However, it is troublesome to manually add common parameters each time. Linux may use the command alias function to reduce your input. The following operations will be clear.

OS: RedHat as4.2

Ls-l list detailed document directory information
Ls-Hl lists document sizes, in K.
Ls-hlt lists documents sorted by Time

For the above three displays, we only need to configure alias LL = 'LS-LHT 'so that we can enter ll.

Under which configuration document does the alias LL = 'LS-LHT 'configuration belong? This depends on your own needs.
For example, you only want the user name Jack to have the above functions, because you only use this user frequently. Modify. barsh_profile in the user's home directory and add alias LL = 'LS-LHT.

If you want to modify the system globally, that is, if any user has the above functions, you must modify the/etc/bashrc document, add alias LL = 'LS-LHT.

If you have other commands, you can add them in sequence.

Alias LL = 'LS-LHT'
Alias df = 'df-H'

 

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.