$ find . -name "*.tmp" -print0
| xargs -0 rm -f
# Deletes every .tmp file — -print0/-0 handles spaces in names
Null delimiter is the safe way to handle filenames
$ cat urls.txt | xargs -P4 -I{} curl -sO {}
# Downloads all URLs 4 at a time, in parallel
-P4 runs 4 curl processes simultaneously — massive speedup
$ find . -name "*.log" | xargs -I{} mv {} archive/
archive/app.log archive/error.log archive/access.log
Move every matched file — replaces a for loop with one line