Homework 2
(due Friday, February 22, 2002)
(worth 50 points only)

IMPORTANT: This assignment must be submitted using WebCT. Late assignments will not be accepted by the system. I highly recommend you submit your assignment before the due date, rather than waiting until the last minute. I will not accept written or e-mailed homeworks.

In this problem, you will take you in a quick tour through some of UNIX's simple commands. The solution to this problem is the script file typescript (see below).

From the UNIX command prompt on CSA, do the following:

  1. Type script to begin a script file.
  2. Type date and date -u
  3. Then display the calendar for the month you were born by typing cal M YYYY where M is the number of the month and YYYY is the year.
  4. Type webster zouave to find out the definition of zouave. Using the "wildcard" character %, type webster z%%%%e to find out how many other six letter words webster knows that start with z and end with e.
  5. Use calc to perform at least two calculations.
  6. Find out my email address by typing ph stephen crampton. Now find out your own email address. (You can do this with any person who has an account at BU.)  Type the letter q to exit the ph program.
  7. Print out the name of your home directory by just typing pwd (print working directory).
  8. Create a new directory called hw1  Move all of your files from Homework 1 into that directory.
  9. Change directories so that you are in the new hw1 directory.  Create a new subdirectory; call it csv-files  Using the wildcard character (*), move all of the .csv files into the csv-files directory using one command.
  10. List the contents of the hw1 directory using the ls command with -l option.
  11. Do the same for the csv-files directory.
  12. Create a new file containing the output of the cal program by typing cal > newfile This will dump the characters that were normally output on the screen by cal into the file called newfile.
  13. Show the contents of the file by typing more newfile
  14. Copy this file to another file by typing cp newfile newfile2
  15. List the contents of your directory using both the ls and ls -l commands.
  16. Remove the files newfile and newfile2 by typing rm newfile and then rm newfile2
  17. Type exit to terminate the script program. The script will be stored in a file called typescript in your current directory.
  18. Submit the file typescript to "Homework 2" under WebCT.