$
Linux Practice
Practice
Tutorials
English
한국어
日本語
中文
terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user
@linux:
~
$
xargs & tar
Reset Lesson
Learn to build commands from stdin with xargs and create/extract archives with tar.
Step 1
Use xargs to pass file names to cat. Pipe file paths through xargs.
Type: echo documents/readme.txt documents/notes.txt | xargs cat
echo documents/readme.txt documents/notes.txt | xargs cat
Step 2
Combine find and xargs to count lines in all .txt files under documents/.
Step 3
Create a tar archive containing readme.txt and notes.txt.
Step 4
List the contents of the archive using tar -tf.
Step 5
Extract the archive with verbose output using tar -xvf.