Lab 5: Software Development and Management

Due Tuesday, September 23, by 10:30 AM


As usual, place the commands you used to solve each of the 5 problems into a file called lab5.
  1. How many packages with "python" in the name are installed on isoptera? (aptitude or apt-cache, grep, wc)
  2. What games are included in the "bsdgames" package? (aptitude or apt-cache, grep and wc if you don't like counting)
  3. Download the file "print_secret.c" to your home directory and compile it with gcc.(gcc). Here's a simple command that will download it for you:
    wget http://isoptera.lcsc.edu/~seth/cs253/examples/print_secret.c
    		
    Compile and run the program. What is the secret?
  4. For print_secret.c, which is larger, the source code or the compiled program (may be named a.out)? Give both the command and your answer. (ls or du)
  5. Write a program that will take an argument on the command line and run it with getoutput, but also print out the amount of time taken to run the program. Refer to "quicksort.cpp" in the class examples area for the timing code. Use argv[1] for the command.
  6. Try out the "time" program (manual section 1). Give an example of how to use it. (time, man)
Turn in your lab by creating a file named "lab5" with no extension in your home directory, with permissions set so that only you can view the file. This assignment is worth 35 points, 5 naming and permissions, and 5 from each of the problems above. Feel free to answer question 5 with a file called lab5.c or something similar, or put the code in your report, whichever you prefer.