Statistics:
mean 40.682 (895.000/22) stddev 5.957 median 41.000 midrange 36.000-45.000
The shell program's purpose is to interpret commands typed by the user and execute the desired executable files.
A process cannot directly modify the state of another process, but executable commands run in separate processes from the shell and cd's purpose is to change what the shell's process thinks of as the current working directly. Hence cd cannot be implemented as a separate command and must be built into the shell.
I'll give you several situations.
- There is not enough memory to allocate to the desired executable file.
- The user does not have permission to access the directory in which the command lies.
- The user does not have permission to execute the requested executable file.
- The command's file does not exist.
- The executable file is not formatted in a manner compatible with the operating system.