3460:428/528 UNIX Systems Programming Spring 2016

Section 801 17846/17847

Monday, Wednesday 6:40 - 7:55 pm Arts & Sciences (CAS) 143



Dr. Michael L. Collard (Schedule)


Atom Feed link

Final Exam # Posted: , NaN

Wed May 11 7:30 - 9:30 pm

The Final Exam will be on Wed, May 11 from 7:30 - 9:30 pm in our regular classroom. It consists of questions of the following types:

  • Given a problem, what combination of bash and command-line tools would you use for a solution? What would the bash pipeline be?
  • Given a problem, which particular parts of the C UNIX API would you use?
  • Consider a complete, command-line utility. Describe what parts would be needed to implement it.

The length of the exam fits into a regular class period of 75 minutes. However, you will have the full amount of Final Exam time to complete it.

Project burst # Posted: Thursday, Apr 21

Due at Final Exam

You will construct a UNIX CLI program called burst. The main purpose is to split a file into segments.

% ls
% wc --lines data.txt
% burst data.txt
% ls
data.txt data1.txt data2.txt
% wc --lines data1.txt
% wc --lines data2.txt
% cat dat1.txt data2.txt | diff - data.txt
  • By default the files are burst into 500 line segments, but that can be changed via a command-line parameter
  • Only read() and write() can be used for access to files, i.e, no use of printf(). stdio.h can only be used for error or tracing messages
  • Each output file will be handled in a separate process or thread. Which one is up to you. No use of exec() with an existing UNIX utility is allowed.
  • There should be a number of command-line options. You will have to design these. Make sure to include standard ones
  • There will be a man page for the utility
  • It is essential to do all error handling, even if the example I presented did not
  • You will need to provide an example of using your program, similar to above. You can use screen to do this. Make this file called burst_ex.
  • This project will be under a GPL license

In addition to the above, you need to add in a special feature to your application that uses an API that is not used for the above. Some examples are:

  • The input file may be compressed (.gz, .bz2, etc.) or in a file archive (.tar,.cpio,.zip). The output files may also be compressed/archived
  • Allow for URLs. You can use libcurl, or just straight sockets

Put this in a repository call “burst”. Add mlcollard as a collaborator. Also, put the current code in your account under the directory “Project4/burst”. You can do a git checkout <url>/burst in the Project4 directory, and it will create the directories and files.

Note that this project has a lot of decisions for you to make. Make sure to develop iteratively and commit often to the repository. Your commit history will be part of your grade. This project will count as 2 regular projects. It will be due by the Final Exam.

GNU Options for CLIs # Posted: Wednesday, Apr 20

Where to find appropriate option names

Where to find appropriate option names.