Linux Command Cheat Sheet/Build command lines from stdin

Pass stdin items as arguments to another command.

Section: Searching and Pattern Matching

Build command lines from stdin

bash
bash
find . -name '*.tmp' -print0 | xargs -0 rm -f
Explanation

Essential when combining `find` with bulk operations safely.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Searching and Pattern Matching
Search shell history
Filter previous shell commands.
OpenIn sheetbashsame section
Search text with grep
Print lines matching a pattern.
OpenIn sheetbashsame section
Search recursively under a directory
Search all matching files in a tree.
OpenIn sheetbashsame section
Show non-matching lines
Exclude lines that match a pattern.
OpenIn sheetbashsame section
Extended regex search
Use extended regular expressions with grep.
OpenIn sheetbashsame section
Fixed-string search
Match text literally instead of as a regex.
OpenIn sheetbashsame section