next up previous contents
Next: Interactive and Sub Shells Up: What is a Shell? Previous: The Man Pages

Unix Commands versus Built in Shell Commands

The Unix operating system comes with many commands that the user can use to interact with computer. Unix commands are simply programs (usually written in the C programming language) that are executed when called for. The usual place for the storage of these commands is the /usr/bin directory. The commands that are available on a particular machine will vary. There is a set number of standard commands that come with a Unix system, but there is no limit to the commands that may be available. An example of this is the more command. Typing more followed by a filename (preferably a text file) will cause the filename to be presented to the default output device a page at a time. Pressing the space-bar will display the next page, typing the enter-key will display the next line, and pressing the q will exit the program. This is how the man pages are displayed. Many users felt that this was too inflexible and along came another command found on many Unix systems called less. The less command is essentially the same as the more command with the exception that it allows the up and down arrow keys to be used to scroll around a document. Many of the Unix commands may be well known to the user while others may not. Some examples are ls, cd, grep, find and chmod to name just a select few. It is important to realize that while these commands might vary in syntax and usage somewhat from one platform of Unix to another, they are shell independent. Whether in the C shell or the Z shell, the grep command behaves the same. Remember to see how a particular command is used on a particular platform, the user can use the man command. Now each shell comes with its own set of built-in\ commands. These are commands that are local to the particular shell. Some examples of these are the history command in the C shell, and the export in the Bourne shell. Built-in commands can be taken as platform independent. It is important to keep in mind having said this that there is a possibility of slight variation between different versions of the shells themselves. This is inevitable, but for the purpose of this book a standarized shell is again assumed. If there is any discrepency between this book and any particular shell, the man pages can again be referenced.


next up previous contents
Next: Interactive and Sub Shells Up: What is a Shell? Previous: The Man Pages

Douglas M Gingrich
Mon Apr 27 15:25:49 MDT 1998