How to copy all files with an specific extension .SAV
from one directory (including all subdirectories within that directory) to another one? I am using the terminal from mac. I have tried
/Users/tournillon/my_directory/research_projects/dissertation_related/inequality
Antonio-P-Tournillon-Ramoss-iMac:inequality tournillon$ ls
Brazil dhs_dados imr201101app.pdf
GHME_Education_final.pptx dhs_sav_files
Antonio-P-Tournillon-Ramoss-iMac:inequality tournillon$ dhs_dados /*.SAV/ dhs_sav_files/
I would assume this is a trivial task but I just can't get the syntax right.
Many thanks,
Antonio Pedro.
find /source/directory -iname \*.sav -exec cp {} /destination/directory/ \;
If you mean a UNIX copy,
cp -R <dirA>/*.sav <dirB>/
I'm not sure what dhs_dados is in your question..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With