I need to find subdirectories called "child" and copy the files in those folders to a new directory. Can't get it to work.
I can get as far as finding the subdirectories but I can't copy the files from them.
> find /Volumes/COMMON-LIC-PHOTO-1/STUDIO-COMPLETE/ISSUETRAK/2016/03_2016 -type d -iname child
The above will find all subdirectories in 03_2016 named "child" but how do I now copy the files inside those directories?
I tried this but the problem is that it seems to want to copy the directories themselves and not just the files:
> find /Volumes/COMMON-LIC-PHOTO-1/STUDIO-COMPLETE/ISSUETRAK/2016/03_2016 -type d -iname child | xargs cp '{}' /Volumes/COMMON-LIC-PHOTO-1/STUDIO-COMPLETE/ISSUETRAK/TEST \;
I can't get it to target only the files.