From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use text filters - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Use text filters
- [Instructor] Linux has the ability to stream data between commands using pipes. It can also redirect those streams to the disk using redirects. Linux even has a stream editor called sed allowing us to edit text as flying through it in real time. Let's talk about simpler commands to manipulate text using filters. We've been using the cat command in this course a lot. The cat command's job is to concatenate files and send the resulting output to standard out. If you give it one file, it will just display it. This is how we've been using it. One thing to remember about cat is that it will display anything, even binary files without warning. Cat will display a file and keep doing it until it gets to the end. If you want to display that file one page at a time you can use less. There's an older tool called more that will do the same thing but is less powerful. We have similar commands to view the beginning and end of…
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
-
(Locked)
Modify the shell environment6m 42s
-
(Locked)
Command history3m 30s
-
(Locked)
The PATH and command execution3m 29s
-
Named and unnamed pipes3m 58s
-
(Locked)
Use input-output redirection (>, >>, |, 2>, etc.)5m 2s
-
(Locked)
Use text filters7m 3s
-
(Locked)
Find files using locate4m 51s
-
(Locked)
Finding files with find4m 47s
-
(Locked)
Finding text in files with grep5m 55s
-
-
-
-
-
-
-