The Unix philosophy, originated by Ken Thompson1, is a set of cultural norms and philosophical approaches to minimalist, modular software development. It is based on the experience of leading developers of the Unix operating system.

Early Unix developers were important in bringing the concepts of modularity and reusability into software engineering practice, spawning a "software tools" movement. Over time, the leading developers of Unix (and programs that ran on it) established a set of cultural norms for developing software, norms which became as important and influential as the technology of Unix itself. This has been termed the "Unix philosophy".

Thompson and Richie
Ken Thompson and Dennis Ritchie, key proponents of the Unix philosophy.

The Unix philosophy emphasizes building simple, short, clear, modular, and extensible code that can be easily maintained and repurposed by developers other than its creators. The Unix philosophy favors composability as opposed to monolithic design. Doug McIlroy2 — then head of the Bell Labs3 Computing Sciences Research Center and inventor of the Unix pipe — summarized the Unix philosophy as follows:

This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.

As stated by McIlroy, and generally accepted throughout the Unix community, Unix programs have always been expected to follow the concept of DOTADIW, or "Do One Thing and Do It Well".

Assignment

Try to find out what task is performed by the following Unix commands:

This can be done in (at least) the following three ways:

Take into account that not all Unix commands support some form of help option.

Each of the following tasks can be performed by at least one of the above commands. Determine which command can be used and figure out what options (flags) and/or arguments need to be given with each command.

  1. wait three seconds

  2. measure how long it effectively takes to execute the command to wait three seconds

  3. write out four lines that each contain a single integer, corresponding to the current day, the current month, the current hour and the current minute

  4. show the last three commands that were executed on the Unix command line

Submission guidelines

For this assignment, you need to submit four commands that perform the given tasks. Put each of your solutions under the corresponding titles in the editor below. The correctness is only tested for the third task.