LPIC-1 Exam 101 v5 (Linux Administrator) — Question 72
What is the purpose of the xargs command?
Answer options
- A. It passes arguments to an X server.
- B. It repeats the execution of a command using different parameters for each invocation.
- C. It reads standard input and builds up commands to execute.
- D. It asks a question, graphically, and returns the answer to the shell.
- E. It allows specifying long options (like --help) for commands that normally only accept short options (like -h)
Correct answer: C
Explanation
The correct answer, C, accurately describes xargs as it reads from standard input and constructs commands to be executed. Option A is incorrect because xargs does not interact with an X server. Option B misrepresents xargs by implying it repeats commands rather than building them. Option D is not relevant as xargs does not pose questions graphically, and Option E is unrelated to xargs' functionality.