CS360 Midterm -- October 18, 1999. Question 4

Write a program prdr that prints all directories reachable from the current directory. For example:
UNIX> ls 
UNIX> prdr
UNIX> mkdir d1
UNIX> mkdir d2
UNIX> mkdir d1/d3
UNIX> prdr
./d1
./d1/d3
./d2
UNIX> echo "Jim" > d1/d3/f1
UNIX> prdr
./d1
./d1/d3
./d2
UNIX>
See the cheat sheet for the syntax of calls that will help you. Do not worry about running out of open files if there are 60+ levels of nested directories.