Last active
June 15, 2017 12:21
-
-
Save innermond/80960a0d2496e1c8a2a3e5733292a8fb to your computer and use it in GitHub Desktop.
find files into a source directory according with a regex pattern and mass copy them to a destination directory while keeping source directory structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find <src>/ -type f -regextype posix-extended -regex '^<pattern>$' -print0 | xargs -0i cp --parents "{}" <dest>/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment