$
Linux Practice
Practice
Tutorials
English
한국어
日本語
中文
terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user
@linux:
~
$
Advanced Pipes
Reset Lesson
Master multi-stage pipes and combine pipes with redirects.
Step 1
List only directories by piping ls -l to grep for lines starting with "d".
Type: ls -l | grep ^d
ls -l | grep ^d
Step 2
Count the number of files in the documents directory.
Step 3
Use a pipe to show the first 3 lines of the log file.
Step 4
Use a 3-stage pipe: cat the log, grep for ERROR, then count with wc.
Step 5
Save all WARN lines from the log to a file called warnings.txt.