optimze find and grep command