3 ms·
This one doesn't need xargs. find . -name '*.log' -delete
by tjalfi 2mo ago
This one doesn't need xargs.
find . -name '*.log' -delete
- sgarland 2mo agoTHANK YOU. I kept nodding along to all of the xargs comments, thinking “sure, but what about the even easier solution?”
- adolph 2mo agoAs well as find has an -exec param to perform things one at a time or all with the same command by using a slash semicolon or a plus sign respectively: #order files from different levels in a file hierarchy by size: find . -type f -maxdepth 1 -exec ls -hlrS {} + #output metadata for each file sequentially find . -type f -maxdepth 1 -exec file {} \;