Comp 2673
Spring 2002
Homework 1
Due Monday, April 1
  1. You'll get an email from me soon, mailed to your CS account. The mail will have numbers in it. Email those same numbers back to me. The point of this problem is just to show me that you can read email sent to your account.
  2. Write a C++ program that outputs "Hello, world!" or a more creative but equally friendly output. Compile the program with g++, giving the output the name "greetme". Email the executable as an attachment to comp2673@cs.du.edu
  3. Look at the man pages for diff. Try it on two files that have similar contents, and on two files that are identical. Explain in your own words what the -b flag does. Write down the line I should type at the prompt if I want to compare the contents of Janeprogram.cpp to the contents of Martinprogram.cpp, but I want it to ignore all differences in case and white space (i.e., I want it to treat "A+B;" as the same as "a + b ;")
  4. Look at the man pages for grep. Write down the line I should type at the prompt if I want to know which file(s) in ~ftl/foodir have the word "apple" in it. Which file(s) in ~ftl/foodir have the word apple in it?
  5. All of the files in ~ftl/foodir are set to have the same permissions. What are they, and what do all those letters and dashes mean?
  6. When you enter a command, which directories are searched for the command, and in what order?
  7. What line should I type at the prompt if I want to know the total number of bytes used in /usr/bin. How many total bytes are used in /usr/bin?