How to use the Linux-type command every day

Source: Internet
Author: User
A little Linux-type command is used every day. Generally, the type command is used to determine whether another command is a built-in command, but it actually has more usage. Www.2cto. com1. determine whether a name is alias, keyword, function, builtin, f...
A little Linux-type command is used every day. Generally, the type command is used to determine whether another command is a built-in command, but it actually has more usage. Www.2cto.com 1. determine whether a name is alias, keyword, function, builtin, file or nothing: the output of type ls is the alias of "ls -- color = auto". the output of type if is the shell keyword. the output of type is the shell embedded type gedit, and the output of type gedit is gedit. yes. the output of/usr/bin/gedit type frydsh is bash: type: frydsh: not found 2. determine whether a name is alias, keyword, function, builtin, file, or anything else (applicable to script programming ): the output of www.2cto.com type-t ls is alias type-t if. the output of keyword type-t type is builtin type-t gedit. the output of file type-t frydsh is not output. 3. display all the possibilities of a name: the output of type-a kill is kill, the embedded shell, and the output of kill is/bin/kill type-at kill. the output is builtin and file 4. view the execution path of a command (if it is an external command ): type-p gedit output is/usr/bin/gedit type-p kill no output (because kill is a built-in command) 5. force search external command: the output of type-P kill is/bin/kill.
 

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.