I'm wondering how to optimize the following shell command in Mac OSX in order to fulfill the function you want to basically copy all files xx folder to the xx2 folder:
ditto $(mdfind xx1) ~/Desktop/xx2
or
ditto $(mdfind -onlyin ~/xx1) ~/Desktop/xx2