101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 50


When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?

Show Answer
Correct Answer: E

When redirecting the output of find to the xargs command, the -print0 option is used if the filenames contain spaces. This option outputs the filenames followed by a null character instead of a newline, ensuring that filenames with spaces or special characters are properly handled by xargs.

Discussion

3 comments
Sign in to comment
aMiPLOption: E
Mar 31, 2021

find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f Find files named core in or below the directory /tmp and delete them, processing filenames in such a way that file or directory names containing spaces or newlines are correctly handled.

lordg21
Nov 9, 2022

UYFYUFUY

NinymoOption: E
Mar 24, 2024

Answer: E