ops102:redirection
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ops102:redirection [2024/02/01 19:43] – [Piping] chris | ops102:redirection [2024/05/04 02:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== Standard File Descriptors | ===== Standard File Descriptors | ||
| - | On Linux, other Unix-like systems, and on Windows, programs may open **file descriptors** (Linux terminology) or **handles** (Windows terminology). Each file descriptor/ | + | On Linux, other Unix-like systems, and on Windows, programs may open **file descriptors** (Linux terminology) or **file handles** (Windows terminology). Each file descriptor/ |
| By default, three channels are opened automatically by the shell when a process is started. These are: | By default, three channels are opened automatically by the shell when a process is started. These are: | ||
| Line 107: | Line 107: | ||
| | | ||
| | | ||
| + | |||
| + | Note that in this example, it is necessary to redirect stdout before redirecting stderr to the same location. | ||
| ===== Piping | ===== Piping | ||
| - | Piping is a special case of redirection, | + | Piping is a special case of redirection, |
| For example, on Windows, the output of the '' | For example, on Windows, the output of the '' | ||
| Line 137: | Line 139: | ||
| -- More --</ | -- More --</ | ||
| - | Press the ENTER key to scroll by one line, or the spacebar to scroll by one screen. | + | Press the ENTER key to scroll by one line, the spacebar to scroll by one screen, or " |
| Similarly, on Linux, a long directory listing could be redirected to '' | Similarly, on Linux, a long directory listing could be redirected to '' | ||
| Line 166: | Line 168: | ||
| | | ||
| | | ||
| - | ></ | + | :</ |
| - | Like '' | + | Like '' |
| On Windows, to see the '' | On Windows, to see the '' | ||
ops102/redirection.1706816631.txt.gz · Last modified: 2024/04/16 18:10 (external edit)
