CS360 Midterm -- October 18, 2000. Question 2
You are a disgruntled employee with a clearly amoral and vicious
demeanor. While in a meeting with your boss, he is called away
to talk with his supervisor. You know that the meeting will
take exactly thirty minutes, no more, and no less, and during those
thirty minutes, you are in his office alone.
The door is closed.
And he has left himself logged into his machine.
Time for some fun. You fire up a new xterm and plan to
write a program that you can run later that will remove all
of his files.
Write the program that will destroy all of his files.
His home directory is /home/boss.
This program must do a explicit recursive directory traversal --
you can't call:
system("rm -rf /home/boss");
But the program should be equivalent to the above call.
You might want to peruse the cheat sheet
for syntax, etc, of calls that can help you.
Use the answer sheet for question 2 to
write your code.
We will continue our devious scenario in Question 3.