Possible Duplicate:
How can I copy a subset of files from a directory while preserving the folder structure?
I have a bunch of directories like this:
/Artists/Example Name 1/Images/Lo-res/
/Artists/Example Name 2/Images/Lo-res/
/Artists/Example Name 3/Images/Lo-res/
I want to use the cp
command to copy all the contents of all of the "Lo-res" directories to another location while keeping their preceding directory structure (the name and images directories) intact.
I've been trying this
cp -R /Artists/*/Images/Lo-res /New_Location/
But that just copies all the files into one new Lo-res folder.
Can anyone help?
cp
does. I think you need to use something else to get the effect you want, such astar
. – Celada Nov 29 '12 at 23:08rsync
and its filter rules – Abe Voelker Nov 29 '12 at 23:10