Ravi Sir's Cards › AWS
find + xargs
This revision card explains find + xargs. It starts from the need that act on thousands of files. It describes -exec {} + or xargs batches. The how-to section notes -print0 | xargs -0 is space safe. An example on the card is clean old temp files.
Read card text
What this card says
Why do we need it?
Act on thousands of files.
What is it?
-exec {} + or xargs batches.
How to do it
-print0 | xargs -0 is space safe.
Example
Clean old temp files.
find /tmp/build -type f -mtime +7 -delete