Command I used, for posterity: for fn in $(cd /usr/src/enet; echo **/*); do if [ -e $fn ]; then cp -a \ /usr/src/enet/$fn $fn; fi; done