I was wondering if it's possible to copy multiple specific directories recursively at once.
I know I can copy all sub-directories like so
cp -rp root/pass/dir/* root/other/dir/
But I'm wondering if I can recursively copy specific directories like with files
cp -p root/pass/dir/subdir/file{1,2,3}.php root/other/dir/
Lets say, in dir there are sub-directories subdir1, subdir2, subdir3.
Can I copy them recursively in the same way? e.g.
cp -rp root/pass/dir/subdir{1,2}/ root/other/dir/
cp -rp /path/dir/{1,2} /dest/paty
works fine. – Ravexina May 01 '17 at 09:35