cat


The following program is a very simple version of the cat command: it takes one or more files, and prints the contents of these files to stdout. It demonstrates the four central system calls for I/O: open, read, write, and close.

The complete source code and Makefile is available as a zip file.

cat.c