O'Reilly logo

A Practical Guide to Ubuntu Linux (Versions 8.10 and 8.04), Second Edition by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Builtin Commands

Builtin commands, which were introduced in Chapter 7, do not fork a new process when you execute them. This section discusses the type, read, exec, trap, kill, and getopts builtins. Table 27-6 on page 971 lists many bash builtin commands.

type: Displays Information About a Command

The type builtin provides information about a command:

$  type  cat  echo  who  if  ltcat  is  hashed  (/bin/cat)echo  is  a  shell  builtinwho  is  /usr/bin/whoif  is  a  shell  keywordlt  is  aliased  to  'ls  -ltrh  |  tail'

The preceding output shows the files that would be executed if you gave cat or who as a command. Because cat has already been called from the current shell, it is in the hash table (page 1111) and type reports ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required