Input / Output Redirection But in ye olden days when mainframes were text based and nearly all programs of value were text-based. When you ran a program, the understanding was that the input would be typed from a keyboard, and the output would go to the screen. On a UNIX system of that era (and this still true), the name of the keyboard and screen was /dev/tty . However, this is really inconvenient, because the user to always type input limits the usefulness of your program. Let's say you want to run the program at 3 A.M. because no one is going to be around, and the machine runs faster. You gonna show up at 3 A.M. to start typing? Wouldn't it be nicer if the computer could type in the input for you while you were at sleeping? This is what input redirection is all about. While the standard input and output are by default /dev/tty (the keyboard and the screen), you can reset them to something else. On a Linux shell, this is accomplished by such symbols as < > >& 2> and >>. < : Change the input file to this. > : Change the output file to this: 2> : Change the error file to this: >& : Combine output and error files to this: >> : Append output to this without erasing what's already there. Unix systems have another output file if you want to use it. This is called "standard error." 99% of the time, I just want the error messages to the same file as the output, but on those occasions you don't, you can also send error messages to another file. (In ye olden days, I would check that my program had no errors by simply verifying that the size of the error file was 0.) In C, this is called "stderr". Windows and Mac ALSO use the standard input, standard output, standard error system for redirecting files. The Data General mainframe on which I learned to program, had four files, @INPUT, @OUTPUT, @LIST, @DATA . @INPUT and @DATA were for input and @LIST and @OUTPUT were for output. On a Linux system (and this is also true of Windows and Mac), at the operating system level, all open files are assigned a non-negative integer, this is called the "file descriptor." Standard input ALWAYS has a fd of 0. Standard output ALWAYS has 1. Standard error ALWAYS has 2. On a Linux and a Mac (and even Windows to an extent) we deal with processes. Processes can create other processes. The process that creates a new one is called the parent process, and the one that is created is called the child process. A process runs a program. A process can be created blocked or unblocked. Blocked: the parent process is blocked (frozen) until the child process terminates. Unblocked: The child is created and both parent and child run. This is the default on Linux. On most systems, a parent process has the ability to terminate a child process (or any descendant) process, but to terminate any other process would require elevated (root) permissions. In Linux (and Mac and Windows) a process can be root or not root. A root process has all sorts of privileges and accesses. Root can access any (or most) files on the system whether it owns them or not. Root can terminate processes, change the system clock, or any other thing that a normal process would be forbidden from doing. On a Linux system, if I wanted to create a child process: --> Issue a fork command to the OS. This creates a child process running the same program that I'm running from the same point that I'm running it. But the child knows it's a child and the parent knows it's a parent. --> The child then issues an exec system call to change the program it's running.