OSN Assignment 2 made by Prakhar Jain (2022121008)
- Inside
2022121008_Assignment2 folder
, runmake
and then ,./shell
to start the shell
- the shell starts with the prompt
<USERNAME@HOSTNAME: CURRENT_WORKING_DIRECTORY>
-
cd
- changes the directoy . cd acommand also supports'.', '..', '-', '~'
. works on bothrelative
andabsolute path
-
pwd
- prints thecurrent working directory
-
echo
- prints the strings as it is after handling tabs and spaces -
ls
- lists all the information of a file or files inside a directory also suppports -a (prints hidden files) flag and -l (prints information in long format) flag -
exit or quit
- these commands will kill the terminal
-
background
- commands ending with '&' are treated as background processes. After exiting the process name along with the pid is printed with status normally or abnormally. -
foreground
- all other commands are treated as foreground commands. The time interval for which the command executes is also printed.
-
syntax -
pinfo <pid>
pid is optional -
If
nothing
is given as argument information aboutall child processes is given
. -
If
pid
is given as argument then the information about the given process is printed.
-
Discover command searches for a file or a directory.
-
-d
- searches for all the directories. -
-f
- Searches for all the files.
- History command prints the last 10 commands entered in the shell.