When performing backups under Bash with
rsync, I'm trying to exclude all dotfiles and hidden directories in the top directory, but not those in otherwise targeted directories. For example:
/copyme.c /.dontcopythisfile /.dontcopythisdirectory/or_its_contents /directory/.butcopymetoo
rsync -a --include=".includeme" --exclude=".*" . DEST fails to copy the desired dotfiles in subdirectories, but variations such as
--exclude="./.*" also fail.
Suggestions? Does this require a filter rule as opposed to the simpler