How can I copy all files of specific type to a specific folder using Mac's Terminal.
find . -name '*.STY' -type f -print0 | xargs -0 -I '{}' /usr/bin/rsync -avR "{}" "./styleFiles_chekad/"
Above shell script does the job and keeps the folders in tactintact. What if I want don't want the subfolders and want to have all the files right in the "styleFiles_chekad" .? However, it is very complicated. Is there a nan easier way to do this? The following command does not work!
cp . -name '*.STY' styleFiles_chekad/
Any help would be greatly appreciated.
CS
PS. Anyone can recommend a good resource for bash scripting?