#!/bin/bash mkdir -p test for ((i=1; i<=10000; i++)) do touch ./test/$(date +%H%M%S%N).txt done
time find ./test/* -delete
real 0m0.196s
user 0m0.109s
sys 0m0.086s
time find ./test/* -exec rm -f {} \;
real 0m8.963s
user 0m3.612s
sys 0m5.651s
time find ./test/* |xargs rm -f
real 0m0.192s
user 0m0.108s
sys 0m0.107s
原文:https://www.cnblogs.com/37yan/p/14917110.html