O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

I/O Redirection

With Unix, I/O redirection is defined as nothing more than sending input or output to somewhere other than the default locations, specifying a different or alternative destination. Input and output redirection is done with special characters.

It should be noted that every Unix shell offers I/O redirection with a standard set of characters used to achieve it. Those characters are

<, which redirects standard input to come from a file

>, which redirects standard output to go to a file

There are other characters that we will learn about, but for now, these are the two most common forms of I/O redirection known or used.

We will look at an example of using these characters with the cat command. We learned about this command when we learned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required