ABSTRACT

All computer software performs one or more of the following operations: input, processing, and output; a typical command performs all three. This chapter describes the notion of standard files—standard input, standard output, and standard error files—and file descriptors; input and output redirection for standard files; and how powerful operations can be performed by combining pipes, file descriptors, and redirection operators. It discusses the concept of error redirection and appending to a file; and error redirection in the Tenex C (TC) shell. The chapter explains the concept of pipes in Linux and the concept of First-in first-out (FIFO) and their command line use. It covers the following commands and primitives: &, |, <, >, >>, cat, diff, find, grep, lp, mkfifo, more, pr, sort, stderr, stdin, stdout, tee, tr, uniq, wc, and xargs. The chapter argues that the I/O redirection and piping operators can be used in a single command.