User Tools

Site Tools


important_dates

This is an old revision of the document!


Important Dates

  • October 15: Assignment 1 is due.
  • November 5: Assignment 2 is due.
  • December 4: Assignment 3 is due.
  • December 6: Final Exam at 9am.

Weekly Labs

To do the labs, you must have an EECS account. Activate your account from any browser by following this link.

If you are in the lab, login with username active8 (password:active8) to activate your account.

Lab 2 - September 16 and 17

Study the tutorials 5 and 6 from here. Try the examples and do the exercises.

Complete the following tasks:

  1. Using this phone book, do the following by issuing one command only:
    • Display entries of people whose names contain the substring “alex”, case-insensitive. (The output should be the entries of alex johnson and Alexander Smith.)
    • Display entries of people whose phone number ends in 2.
    • Display only the names of people whose phone number does not contain the number 3.
    • List all area codes in the phone book sorted numerically
    • List the names of contacts in the 905 area code
  2. Suppose myFile is in your working directory. Specify the command(s) you would use to do the following:
    • Give everyone permission to read myFile; do not change any other privileges.
    • Permit the owner (you) and group members to read and write the file; remove all privileges from everyone else.
    • Remove writing privileges from everyone but the owner.
    • Give the owner and group members permission to execute myFile, while giving the owner sole permission to read and write the file.
  3. Suppose you have a directory named myStuff in your working directory. Specify the command(s) you would use to do the following:
    • Give everyone permission to list files in myStuff; do not change any other privileges.
    • Permit the owner and group members to list, remove, or add files; remove all privileges from everyone else.
    • Remove writing privileges from everyone but the owner.
    • Give the owner and group members permission to execute myStuff, while giving the owner sole permission to read and write the directory.
  4. Perform the following tasks. If you have less that 10 .txt files in your account, create some empty ones using the touch command
    • List the number of .txt files in your home directory (including any subdirectories)
    • List any 10 of the above files, each file preceded by the number of lines in it
    • List all empty .txt files in your home directory (including any subdirectories)
    • List all files that were modified in the last day in your home directory (including any subdirectories)

Don't forger to look at the man page of each command if you are not sure how to use them.

Nothing to submit this week as well (but next week there will be)!

Lab 1 - September 9 and 10

Study the introduction and the first four tutorials here. Try the examples and do the exercises.

Complete the following tasks:

  1. The echo command takes a line that you type and repeats it back on the screen. Use it with any text you want and redirect the output to a file named myFile.
  2. Use the echo command to input 5 more lines and append them to file myFile, which will contain a total of 6 lines of text.
  3. Append to file myFile the output of the following commands: who, whoami, and date.
  4. Create a set of text files and name them backgammon, backpacking, baseball, boxing, biking, chess, fencing, blackjack, groupA, groupB, groupX, groupY.
    • How would you use cat to show the contents of the files ending in ing?
    • How would you list any files containing x or X in the file names?
    • How would you show the contents of files with names containing o?
    • How would you show the contents of the files backgammon, backpacking and blackjack using just one command?
    • How would you copy the contents of all 3 files backgammon, backpacking and blackjack to a file named all3 using just one command?
  5. Given this file, specify the command(s) you would use to do the following:
    • Count the number of people whose area code is 905. Display just the count (not the entries).
    • Display the entries of the babysitters.
    • Count the number of friends whose names are in phone_book. Display just the count (not the entries).

To answer question 5, read ahead in the tutorials on grep.

There is nothing to submit this week!

important_dates.1568760461.txt.gz · Last modified: 2019/09/17 22:47 by bil