On a Linux 64bit CentOS server, I am running a GNU find command on several folders, each of them containing a similar subfolder structure. The structure is:
The folder asterisk
/*/ is to indicate that there are a bunch of subfolders inside each project folder, of varying names.
I have tried adding the final asterisk and then limiting the find command to a certain
-mindepth N and
find $folder1 $folder2 $folder3 -mindepth 1 -maxdepth 1 -name "*file_pattern*"
But the tests are on a server node that has other running jobs, so it's difficult to get a fair performance comparison, also mainly due to some level of caching taking place after the first command, which makes the first type of command slow and the second equivalent type faster.
This is a multicore node, so what else could I try to make this type of commands faster?