xargs takes output from stdout and forwards it as argument to the next command. For example in combination with the
find command instead of its
ls | tee logs.txt | xargs cat
Writes the output of
ls stdout and to the defined log file and then sends it as arguments to the
find . -name "l*.txt" | xargs cat
Combines the find command to use the search result as command arguments.