10.8.2 Redirection Command – Change Input and Output Device
In Linux, when you run a particular command, it sends its execution results to a predefined output device. However, if necessary, the execution result can be sent to an output device other than the predefined output device.
It is “<" and ">” (redirection) that is used in this case. If you use this command, it sends the execution result to the output device specified after this command. “redirect” means to change the default input device and the default output device where are set as the keyboard and monitor to another device.
Note that there are several commands as follows for user to redirect input and output with:
■ < and << -- Sends the processing result of the right to the left.
■ > and >> — Sends the processing result of the left to the right.
■ < and > — Overwrite existing file if one exists
■ << and >> — Append existing file if one exists