Essay about Assignment 3
The shell works very fast. You might think you're waiting on it but it's finished... You can give it multiple commands, and they will execute in the order you type in. While it is working it will spit out some results and when done it will return you to $ prompt
2. What is a PID number? Why are these numbers useful when you run processes in the background?
A PID (i.e., process identification number) is an identification number that is automatically assigned to each process when it is created on a Unix-like operating system.
The PID is needed in order to terminate a …show more content…
3.$ cat > date echo "This is my own version of date."
Fri May 22 11:45:49 PDT 2009
Annotations for line:
1. "whereis date" tells us where the executable file "date" is located, according to the current $PATH value. The result tells us that the executable file "date" is found in /bin
2. echo $PATH tells us what is the content of the $PATH environment parameter. Each path is separated by a colon ":".
3. "cat > date" takes standard input (stdin) from the keyboard and put the keyed in content into a new file in the current directory called date. The input should be terminated by a control-d, which is not mentioned in the question.
The file "date" usually has a permission of 644 or 600 (depending on the computer implementation), which means that it is not executable.
4. ./date attempts to execute the file ./date, but it is not executable (by default). Again, depending on the implementation of the system, it may return
"permission denied", or possibly search for the next directory from the $PATH environment variable, which outputs the current date and time.
What are two ways you can execute a shell script when you do not have execute access permission for the file containing the script? Can you execute a shell script if you do not have read access permission for the file containing the script?
You can give the name of the file