Computer Laboratory

Course pages 2014–15

Unix Tools

Principal lecturer: Dr Markus Kuhn
Taken by: Part IB

No. of lectures: 8
Suggested hours of supervisions: 0-1 (non-examinable course with exercises)
Operating Systems provides a useful foundation for this course.

Aims

This course provides students who have already basic Unix/Linux experience some important additional skills, on how to use the shell and related tools as an efficient working environment and for automating routine tasks. It also introduces tools and techniques for working in teams, covering version control and how to automate builds. These skills are essential in most real-world software projects, and in particular for CST Part IB and Part II project work.

Lectures

  • Unix concepts. Brief review of Unix history and design philosophy, documentation, terminals, inter-process communication mechanisms and conventions, shell, command-line arguments, environment variables, file descriptors.

  • Shell basics. Program invocation, redirecting standard I/O, pipes, file-system navigation, argument expansion, quoting, job control, signals, process groups, variables, locale.

  • Shell script programming and configuration. Efficient command entry with history and alias functions. Scripts, plain-text file formats, control structures, functions. Customizing user environments.

  • Common tools. Overview of common text, shell, and network utilities and their most frequently used options, including sed, grep, chmod, find, ssh, rsync, packaging and compression tools.

  • Revision control systems. diff, patch, RCS, Subversion, git.

  • Software development tools. C compiler, linker and debugger, makefiles.

  • Perl. Introduction to a powerful scripting and text manipulation language. [2 lectures]

Objectives

At the end of the course students should

  • be confident in performing routine user tasks on a POSIX system, understand command-line user-interface conventions and know how to find more detailed documentation;

  • appreciate how a range of simple tools can be combined with little effort in pipes and scripts to perform a large variety of tasks;

  • be familiar with the most common tools, file formats and configuration practices;

  • be able to understand, write, and maintain shell scripts and makefiles;

  • appreciate how using revision control systems and fully automated build processes help to maintain reproducibility and audit trails during software development;

  • know enough about basic development tools to be able to install and modify C source code;

  • have understood the main concepts of and gained initial experience in writing Perl scripts (excluding the facilities for object-oriented programming).

Recommended reading

Robbins, A. (2005). Unix in a nutshell. O’Reilly (4th ed.).
Schwartz, R.L., Foy, B.D. & Phoenix, T. (2011). Learning Perl. O’Reilly (6th ed.).