Published
- 1 min read
bash copy files but exclude some directories
The solution for this is noted below
bash copy files but exclude some directories
Solution
# Basic syntax:
rsync -a /directory/to/copy --exclude=directory_to_ignore
# Note, the directory_to_ignore can be anywhere within the
# /directory/to/copy
# Note, to add additional directories to ignore, add more --exclude
# statements
Try other methods by searching on the site. That is if this doesn’t work