From the course: Linux CentOS 7: Shells and Processes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

File redirects and tees

File redirects and tees - Linux Tutorial

From the course: Linux CentOS 7: Shells and Processes

Start my 1-month free trial

File redirects and tees

- [Instructor] Every command has one input standard in and two outputs standard out and standard error. A pipe sends standard out from one command to the standard in of another. A redirect works in a similar manner, but the source or destination is the file system. By default the output of a command goes to the screen. This includes standard out and standard error. Standard out is the successful output from a command. Standard error is used for error messages. Redirection allows us to split these two outputs individually. We can redirect either output or both to a disk. Commands also have a standard in. If you wanted to redirect a file to a command we can with the redirect toward the command. Once the command has processed the output we could then redirect that output back to the disk. Let's see what this looks like using commands. To redirect standard out from a command to a file use a greater than symbol. One greater than symbol overwrites a file or creates it if it doesn't exist…

Contents