Hi,
i have a question on how to use the cp command. I already comepleted the job, but i would like to know how i could use cp to shorten what i did so i could learn how to use it next time.
So for work i needed to copy a bunch of files. This is what my directory tree looks like:
there are 48 directories in level 1. The directories below don't always exsist in all 48 direcetories, but i want the directories abc, def, and ghi and their contents copied over to /usr/somedirectories/lib/
so that there will be lib/abc, lib/def, and lib/ghi. All files have different names (or should- there might be one or two human errors i can take care of manually, never know) so i want everything to merge, and there are plenty of duplicate folders and some folders might be empty.
My current idea is
cp */*/{abc,def,ghi,jkl,mno} /usr/somedirectories/lib/
does this work? what's wrong with it? I've already copmpleted the job so i cant try it on anything.