hello all,
Ive got a simple question, but i havent found the simple answer, or any answer for that matter.
I'd like to copy a hierarchy of files, but with a catch: i only want the .txt files. cp has the recursive
option -r which copies everything
cp -r foo/* bar
but i just want the .txt files. i thought it might work to do this:
cp -r foo/*.txt bar
but this doesnt recurse (obviously since my folders dont end with .txt)
What can i do?
Thanks in advance!