CSc 352: Assignment-1: Basic Unix Commands

Due Monday, June 10th


You are to create two files, myStmt and myOutput, as directed below, and then submit them electronically on host lectura.cs.arizona.edu using the command

turnin cs352_hw1 myStmt myOutput

Please follow the directions below carefully: submissions that don't follow directions will be penalized heavily.

  1. Use a text editor under Unix to create a file called myStmt that describes (a) what your major is, and why you chose that major; and (b) why you are enrolled in this course (CSc 352), and how it relates to your major. Use wc to make sure that this file contains at least 20 lines and 100 words.
  2. Create a file myOutput containing the following information, one item per line:

    1. Your lectura login id;
    2. The number of characters in your myStmt file;
    3. The total number of files(including hidden files) in the directory /usr/local/bin;
    4. The number of bytes in the largest file in the directory /usr/local/bin on lectura.
    5. The smallest number in the file /home/cs352/SUMMER02/Hw1Input/NUMBERS on lectura.
    6. The largest number in the file /home/cs352/SUMMER02/Hw1Input/NUMBERS on lectura.
    7. The 10th. line from the beginning of the lectura file /home/cs352/SUMMER02/Hw1Input/BINFILES.
    8. The 210th. line from the beginning of the lectura file /home/cs352/SUMMER02/Hw1Input/BINFILES.
    9. The 99th. line from the end of the lectura file /home/cs352/SUMMER02/Hw1Input/BINFILES.

    Sanity Check: Count the number of items you've been asked to put into your myOutput file; use wc to count the number of lines in your myOutput file. Do they match?