From the course: LPI Linux Essentials (010-160) Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

I/O redirection

I/O redirection

- Sometimes from the command line, you need to redirect things into or out of a program, and that's where redirection comes into play. When you have a need to save a program's output for future reference, you can redirect it to an output file. But if you have a program that needs to take something as an input, you can redirect it from an input file. Now, when you're dealing with input redirection, I know this can sometimes sound strange, but some programs will rely on this feature to enable them to process data, such as raw text files, that are being fed through a program to search it for patterns and things like that. In addition to redirecting your output to files or as input into another program, a program's output can also be passed into another program as its input by using a thing called piping, as we just learned about. Now, there's a related technique that involves something called xargs. The xargs command enables…

Contents