From the course: Linux Tips

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

System basics: Bash output redirection

System basics: Bash output redirection - Linux Tutorial

From the course: Linux Tips

System basics: Bash output redirection

- [Instructor] When you're working at the Bash prompt, usually you type information in the command line; and you see a response when a command runs or returns an error message. But there's a little more to it than that. The command prompt represents the standard input, one of three special streams of data that a process has access to. Standard input is generally input from the keyboard. Another stream, the standard output, is what we see as the result of running programs in a text environment like a terminal; and there's another stream we see sometimes called the standard error. That stream carries exception messages from programs as they run. By using special operators, you can change how the shell treats them. One of the most common uses for redirection is to take the standard output and send it somewhere else. We have two primary ways of doing this: with a pipe, which sends the output to another command; or with various other redirection operators, which send the output to a file…

Contents