As an illustration of the way that the shell and the kernel work together, suppose a user types rm myfile (which has the effect of removing the file myfile). The shell searches the filestore for the file containing the program rm, and then requests the kernel, through system calls, to execute the program rm on myfile. When the process rm myfile has finished running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for further commands.
The adept user can customise his/her own shell, and users can use different shells on the same machine. Staff and students in the school have the tcsh shell by default.
The tcsh shell has certain features to help the user inputting commands.
Filename Completion - By typing part of the name of a command, filename or directory and pressing the [Tab] key, the tcsh shell will complete the rest of the name automatically. If the shell finds more than one name beginning with those letters you have typed, it will beep, prompting you to type a few more letters before pressing the tab key again.
History - The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.
A process is an executing program identified by a unique PID (process identifier).
A file is a collection of data. They are created by users using text editors, running compilers etc.
Examples of files:
The assignment for the following week (3rd class) will be to research two UNIX commands with which you are unfamiliar. If you would like to choose them this week and do the research early, please let me know in class which programs you have chosen. Please do not choose graphical programs like Mozilla or Gimp, but rather a command line program. It is expected that you will try using the program and in so doing inform your (brief) presentation about how it works and what it does.
Do not plan on skipping the assignments in the first eight weeks of this class, which will account for 50% of the grade. I'm sorry to treat this as homework rather than a labor of love, but in the interest of keeping the class moving forward together, I hope that the grade will inspire you if UNIX does not (initially!).