click below
click below
Normal Size Small Size show me how
Redirect IO Symbols
Linux + (To redirect input or output, you use symbols following the command)
| Question | Answer |
|---|---|
| > | Creates a new file containing standard output. If the specified file exists, it’s overwritten. |
| >> | Appends standard output to the existing file. If the specified file doesn't exist, it’s created. |
| 2> | Creates a new file containing standard error. If the specified file exists, it’s overwritten. |
| 2>> | Appends standard error to the existing file. If the specified file doesn’t exist, it’s created. |
| &> | Creates a new file containing both standard output and standard error. If the specified file exists, it’s overwritten. |
| < | Sends the contents of the specified file to be used as standard input. |
| << | Accepts text on the following lines as standard input. |
| <> | Causes the specified file to be used for both standard input and standard output. |