Skip to Content
Mastering Ubuntu Server - Second Edition
book

Mastering Ubuntu Server - Second Edition

by Jay LaCroix
May 2018
Intermediate to advanced
552 pages
14h 55m
English
Packt Publishing
Content preview from Mastering Ubuntu Server - Second Edition

Redirecting output

Before we go any further, we should have a discussion about redirecting output. One of the many great things about Linux is that it's made up of many utilities, each doing one thing and doing that one thing well. These smaller commands and utilities become even more efficient because we can take the output of one command and redirect it into the input of another command. Take this command as an example:

cat /var/log/syslog | grep apache2

Here, we're using the cat command to print the contents of the system log stored at /var/log/syslog. Using the pipe symbol, we're redirecting the output of that command and feeding it into grep, which is looking for the string apache2. When used together, we're able to fetch lines from ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Ubuntu Server - Third Edition

Mastering Ubuntu Server - Third Edition

Jay LaCroix
Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones

Publisher Resources

ISBN: 9781788997560Other