Copy files with a specific extension and preserve the directory structure

Source: https://superuser.com/questions/299938

Code:

#!/usr/bin/bash

destination="/path/to/somewhere" ; find . -name "*html" | cpio -pdm ${destination}