Linux commands are small on purpose. Each one does a single job, and the real power comes from combining them. This module shows you how to connect commands together and how to search, filter, and reshape text, which is the everyday work of reading logs, configuration files, and command output.
It starts with redirection: the standard input, output, and error
streams and the >, >>, <, and
2> operators. Next come pipes, which feed the output of
one command into another. From there you'll learn to
search with grep, then to
sort, count, and cut text with sort, uniq,
cut, and wc. It closes with an introduction to
sed and awk for replacing text and working
with columns.
Build pipelines one step at a time and check the output after each command. When you're comfortable chaining commands, continue on to Users, Groups & Processes.
Learn the three standard streams (stdin, stdout, and stderr) and use >, >>, <, and 2> to send output to files and read input from them.
Use the | operator to pass the output of one command to the input of the next, and see how small commands combine into powerful one-liners.
Find lines that match a pattern in a file or in piped output, and use common options such as case-insensitive, inverted, and recursive searches.
Sort lines, remove or count duplicates, pull out columns, and count lines and words, then combine them to summarize a file.
Replace text with sed, work with columns using awk, and combine them with grep to pull useful information out of log files.