Every Unix command takes the information it needs from an input device and sends the information it produces to one or more output devices. Refers to the device from which a command receives its input, unless otherwise instructed. Refers to the device to which a command sends its output, unless otherwise instructed. Refers to the device to which a command or utility will send any error messages, unless otherwise instructed.
Input devices are usually terminal keyboards and files.
Output and standard error devices are usually terminal screens, files and printers. Different commands have different definitions of stdin, stdout and stderr. For instance, the cat command takes a terminal as its standard output device, but the lpr command takes a printer as its standard output device. The mail utility's normal stdin is the terminal.p. Appending You can append output to an existing file by using the redirection symbol.