Linux Learning Note-type command

Source: Internet
Author: User
Tags builtin

Grammar:

Type [-TPA] Name

Parameters:

Type: When no arguments are added, the type shows whether the name is an external command or internal bash built-in command

-T: When the-t parameter is added, the type will show the meaning of name with the following words

File: Represented as an external command

Alias: Indicates the name that the command is set for the command alias

Builtin: Indicates that the command functions as a bash built-in command

-P: The full file name is displayed if the next name is an external command

-A: A path defined by the path variable that lists all commands that contain name, including the alias



Example: Query ls whether this command is bash built-in

[[Email protected] ~]# type ls

LS is aliased to ' LS--color=auto '

[[email protected] ~]# type-t ls

Alias

[[email protected] ~]# type-a ls

LS is aliased to ' LS--color=auto '

LS Is/bin/ls


Example two: Query CD

[[Email protected] ~]# type cd

CD is a shell builtin

[[email protected] ~]# type-t CD

Builtin

[[email protected] ~]# type-a CD

CD is a shell builtin






This article is from the "perfect start" blog, be sure to keep this source http://7184803.blog.51cto.com/7174803/1413377

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.