I am querying specific directories to see if I find files with a specific pattern in them and I have been trying it with two different commands:
Standard find command:
find -L $unix_dir\*/ -maxdepth $maxdepth -name \"$filepattern\"
and a tree and grep command replacement:
tree -L $maxdepth -l -i -f $unix_dir*/ | grep '$filepattern'
Is the second one supposed to be faster for some reason? I find it's sometimes faster but sometimes just as fast as the other command, and I am unsure what's the theory behind both. Any ideas?