At the Linux command line, I'd like to copy a (very large) set of
.txt files from one directory (and its subdirectories) to another.
I need the directory structure to stay intact, and I need to ignore files except those ending in
how about you first copy it over with
then go to the new folder and run
Edit: ok you want one command which filters (I have not tested this because my system doesn't have the
Please test this first, because I haven't tried it yet. If someone would verify, that would be great.
Easiest way that worked for me:
one catch is you have to navigate to the "desired" directory before so the "parent path" is correct.
Also make sure that you enabled recursive globs in bash: