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

Use text filters - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

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…

Contents