Created
December 26, 2022 14:01
-
-
Save RobbiNespu/aa81b691956d4283912e65762a69e094 to your computer and use it in GitHub Desktop.
Posix - Speed up "find" + "exec" command (recursive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# let see how many files we have | |
$ find . -type f | wc -l | |
36367 | |
# lets check every file status | |
$ time find . -type f -exec stat {} \; > /dev/null | |
real 0m40.107s | |
user 0m14.381s | |
sys 0m26.410s | |
# lets check every file status | |
$ time find . -type f -exec stat {} + > /dev/null | |
real 0m1.281s | |
user 0m0.626s | |
sys 0m0.656s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment