This contains details of each command of the shell. Multiple commands can be passed as a single argument with colon(;) separation.
-
pwd
- Displays the name of the current working directory.
-
echo
- Displays the the string passed as argument.
-
cd
-
It changes the current working directory to the directory passed as an argument.
-
Implemented in cdCommand.c
-
-
ls
-
Displays the list of all files and directories in the specified directory.
-
Flags -l and -a accounted for.
-
Also handles multiple directories as arguments.eg. ls -al dir1 dir2
-
Implemented in lsCommand.c
-
-
fg and bg processes (System Commands)
-
Is able to run any process in background or foreground.
-
Upon exit(or kill) of a background process ,it displays the name and PID of the killed process.
-
Implemented is sysCommands.c
-
-
pinfo
-
Displays various information about the process whose PID is passed as an argument.
-
Implemented in pinfo.c
-
-
history
-
Displays the last 'n'(n<=20) commands exectued by the shell.
-
Also works upon exit and restart of the shell.
-
Implmented in history.c
-
-
kjob
-
Takes a job ID of a bg process and sends a signal number to that process.
-
Implemented in kjob.c
-
-
fg & bg
-
fg : Brings a bg process to foreground.
-
bg : Changes state of stopped bg process to running.
-
-
setenv and unsetenv
-
setenv : Creates or changes the value of an env variable.
-
unsetenv : Destroys the env varialbe.
-
-
overkill
- Terminates all the bg process.
-
Input/Output Redirection with Piping
-
Signal Handling
-
Ctrl-D : quits the shell
-
Ctrl-Z : Pushes a fg process to background.
-
Ctrl-C : Interrupts a fg process.
-
-
The maximum length of a command is restricted to 1024 characters.
-
Maximum no. of commands passed at a time is restricted to 100.
-
When a backgorund process is killed and the message is displayed. Press Enter to restore the prompt.