Learn › Linux Foundations › Arguments
xargs - a hands-on Linux lab on a real virtual machine.
The Arguments module mission on a real Debian machine. Ten objectives, no commands shown: turn lists into arguments with xargs, watch a space in a filename tear a naive pipeline apart, and rebuild it null-safe with find -print0 and xargs -0.
This is the real machine. The same args-base folder from the lessons is here, built fresh just for you: a file words.txt with four words, and a folder files holding five files, two of them carrying a space in the name. Those two space-named files are the whole reason this module exists.
Ten objectives stand between you and a clean signal. They walk the same road the lessons did: turn a list into arguments, control how many go per run, watch a space in a filename tear your pipeline apart, then rebuild it so nothing can break it again.
No commands are shown here. You read each objective, recall the option from the lessons, and type it. That recall is the point: it is how the skill becomes yours. Progress checks itself as you type, and a signal is one click away on any objective if you get stuck.
Two quick reps in the practice terminal before the real machine boots. Same rules as the mission: the goal is stated, the command is not. Both reps feed words straight from echo, so they need no files at all.
First rep. Print the three words alpha bravo charlie with echo, then pipe them into the argument-builder with no options. All three should come back on one line.
prompt: student@args-base:~$ answer: echo "alpha bravo charlie" | xargs output: alpha bravo charlie hint: echo the three words in quotes, then a pipe, then the tool this module is about, with nothing after it. Its default action already prints.
Second rep. Same three words, but this time cap the builder at one argument per run. Before you press Enter, decide how many lines will print.
prompt: student@args-base:~$ answer: echo "alpha bravo charlie" | xargs -n1 echo output: alpha bravo charlie hint: The per-run cap is the letter n with a number right after it. Set it to one and give the builder echo to run.
Three words, three lines. The cap turned one joined run into three single-word runs, exactly the dial you will reach for on the mission.
Both reps came from memory, not from a copy button. That is what the mission demands, ten times over: the default join, the per-run cap, the placeholder, the whitespace tear, the null-byte cure, and the parallel finish.
Launch the machine below. You land inside args-base already, so the short relative paths from the lessons work exactly as you practiced. Read the first objective and make your first bridge.
Practice Arguments Capstone: Signal in the Noise in a real Linux terminal at The Linux Camp. Progress is verified automatically as you type commands on the machine.