Right now I'm successfully running:
rsync -uvma --include="*/" --include="*.css" --exclude="*" $spec_dir $css_spec_dir
In a shell script which copies all of the files in the source directory, that are .css
files, into a target directory.
I want to do the same for HTML files, but only where they are in a subfolder with the name template
.
Suppose I'm in directory ~/foo
, and I want to rsync where the --include="*/"
only matches on subfolders with the name template
.
~/foo/bar/template/baz/somefile.html
would match~foo/bar/baz/qux/template/someotherfile.html
would match too~/foo/bar/thirdfile.html
would NOT match
So I looked at this question, but they don't quite match what I'm trying to do. The problem is, the list of folders I want to exclude is more than 1 folder--it's, say, 30 folders.