学习的过程也是一个遗忘的过程,为了留下学习轨迹或者是为了以后能够回忆下学习的过程,我会时不时的来更新自己正在学习的内容。
Types of Commands
上一篇 /
下一篇 2008-08-22 23:15:12
/ 个人分类:Linux & shell
When a command is executed, it is an alias, a function, a built-in command, or an executable program on disk.Aliases are abbreviations (nicknames) for existing commands and apply to the C, TC, Bash, and Korn shells.Functions apply to the Bourne (introduced with AT&T System V, Release 2.0), Bash, and Korn shells. They are groups of commands organized as separate routines.Aliases and functions are defined within the shell's memory. Built-in commands are internal routines in the shell, and executable programs reside ondisk.The shell uses the path variable to locate the executable programs on disk and forks a child process before the command can be executed. This takes time. When the shell is ready to execute the command, it evaluates command types in the following order:
Aliases
Keywords
Functions (bash)
Built-in commands
Executable programs
If, for example, the command is "xyz," the shell will check to see if "xyz" is an alias. If not, is it a built-in command or a function? If neither of those, it must be an executable command residing on the disk. The shell then must search the path for the command.
导入论坛
收藏
分享给好友
推荐到圈子
管理
举报
TAG: