Lab (4) - System Security and Administration

Before you start working on this lab, you need to open two screens on student machine. You need to create a text file to save your answers in the file and send the file as an e-mail attachment to Your file should have YOUR NAME on its first line. The Subject line MUST say Lab (4). I will deduct 10 points for each of the labs with missing names or wrong Subject Line.

Q1. What does command jobs do?

Q2. Using the second screen on STUDENT type pine which is your mail delivery system. On the second screen, identify the process ID and Parent.s Process ID for pine. Terminate that process. Make sure that pine is closed on the second screen upon completion of this step.

Q3. What each of the dots in the following example mean? . ./

Q4. Describe what each of these commands will do and demonstrate their use with an example:

Q5. Suppose we have used the myTest=100 in a shell script. Find out what the following two commands produces if run immediately after the above line inside your script. I.e.;
echo myTest
echo $myTest
What is the difference?

Q6. What do you think the following script will do?
ls -la myWorkingDirectory

Q7. Create a file called today and type in that file, this file was created on: dayOfTheWeek Month dayOf TheMonth Time Year. Save the file. Hint: try the date command to get the above information.
Write a script to copy the file today to yesterday, change its permission to read/write/execute to the owner only, and then display its content using the more command.
Can you automate the entire process using a script?

Q8. Use a script to create a directory called backup under your current directory and move the yesterday file to that directory.

Q9. Display your current directory as: My current directory is: ????

Q10. Write a filter command that only displays what day is today when the date command is used to get today.s date. You can try the date command, it displays more than the day information.

Q11. Write a command that takes the content of the file that you had created in Q11 and translate all characters to capital letters.

Q12. What do the following filters do? Demonstrate each with an example.