UNIX Course Information (20-ECES-620-801)


Instructor:    Kenneth Berman

Office: 891 Rhodes,
Office Hours: Weds. 9:00-11:00
Phone: 556-1815
Email: ken.berman@uc.edu
Web: http://www.ececs.uc.edu/~berman/620


TA:    Arvind Chokhani

Office: 810 Rhodes
Office Hours: Tues. Thurs. 9:30-11:00 or by appointment
Phone: 556-7963
Email: achokhan@ececs.uc.edu
Web: http://www.ececs.uc.edu/~achokhan/unix


Course Scheduling Information

Meets: Tues., Thurs. 7:30-9:30 in Braunstein 300


Important Information, Announcements and News

Note that a sample file with records for homework 2 has been given below (see Homework section below).  To test hw2 create a file records and copy records from below into this file (can use cut and paste).  Include this file called records in your special subdirectory 20ECES620801.

If you are having trouble with your oz account.  In particular if you are registered for the course, but do not have the special subdirectory 20ECES620801 set up for you (it usually takes about a day for it to be set up when you create a new oz account), you can get help my e-mailing Ellen Davis at ozhelp.uc.edu

  • Here is the Course Syllabus

    All students need an account on OZ. The machine is part of the Student Access Network and running under Digital UNIX. If you do not have an account on OZ, you can apply for one via the Web at http://OZ.UC.EDU/apply.html. If you are registered for the course 20-ECES-620 a subdirectory with the name 20ECES620801 will be set up automatically in your home directory. If the subdirectory is not created automatically, then you are either not registered, or you are using an account that is not associated with your student ID. All completed assignments have to be placed into that subdirectory. I have access to the subdirectory and thus can test your assignments. I can not access any other subdirectories of your account, and I will not test programs residing on other machines.

    The User's Guide for OZ can be found at http://www.docs.uc.edu/docs/oz. A quick reference guide to OZ can be found at http://www.uc.edu/ucitdocs/ozqg.html.


    Lecture notes


    Supplementary notes

     


    Sample Shell Scripts

  • User enters input - using metavariable $<
  • Look up phone number - using the here document
  • Time stamp a file - using the here document
  • Lists directory files
  • Clean directory
  • Conditional copy directory
  • Total bytes in directory hierarchy - recursive script
  • Script for grading hw1
  • Sum of numbers
  • Clean directory - Bourne Shell Script


    Sample C Programs

  • C program for echo command
  • C program for filter to convert to lowercase
  • Double space
  • Convert to lowercase - file updating
  • Invoke vi editor - system command with C program
  • Simulating a shell
  • Convert ls -l to uppercase - using pipelining in C program
  • Accessing file status
  • Test whether file given in first argument is more recent than file in second argument
  • Rewrite "convert to lowercase" filter using systems calls read and write
  • Version of low.c where input file is first arguments, instead of standard input
  • Version of low.c where input and output files are taken from first two arguments, instead of standard input and standard output
  • Testing for read permission using access system call
  • Testing for read, write and execute permissions using access system call
  • Searching directory for given file using system calls
  • Displays current working directory using system call getwd
  • Rewrite of conditional copy using system calls
  • Example C program using a fork
  • Child computes partial sums and parent compute partial products using fork
  • C program to implement a simple shell using fork and execv
  • Application of popen that counts total number of words in a list of files
  • Example C program where a parent process writes a message (i.e., "Hello Dolly") to a child process through a pipe

  • Homework