From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Use input-output redirection (>, >>, |, 2>, etc.) - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Use input-output redirection (>, >>, |, 2>, etc.)
- [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 of 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 a redirect toward the command. Once the command has processed the output, we could then redirect that output back to the disc. 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Simple and compound commands5m 59s
-
Modify the shell environment6m 42s
-
Command history3m 30s
-
The PATH and command execution3m 29s
-
Named and unnamed pipes3m 58s
-
Use input-output redirection (>, >>, |, 2>, etc.)5m 2s
-
Use text filters7m 3s
-
Find files using locate4m 51s
-
Finding files with find4m 47s
-
Finding text in files with grep5m 55s
-
-
-
-
-
-
-