From the course: Learning Zsh

Unlock the full course today

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

Redirection and multios

Redirection and multios - Unix Tutorial

From the course: Learning Zsh

Start my 1-month free trial

Redirection and multios

- [Narrator] Redirection, represented by the less than and greater than symbols, change where input to a command comes from, or, where output goes. Redirection is useful for making a record of information that would otherwise go to the screen. Or for using a file instead of user generated information as input for a command. As an example, let's use echo hello. And that puts hello on the screen. Now let's redirect that output to a file with echo hello greater than my file. But now, instead, it's inside of the file I redirected it to. This is useful for capturing output of commands for later analysis, for record keeping, and for providing output, such as a log or listing for other people. We can use redirection to read information from that file too. Here, instead of directly providing a file name, we're using redirection to send a file to the command. Right now, if I were to redirect to a file... And then redirect…

Contents