using rsync
Use the --exclude="FOOBAR/FOO.BAR"
option to exclude specific files, where FOOBAR/FOO.BAR is the path to the file, relative to the source directory.
Use the --exclude="/.*"
option to exclude hidden files in the topmost directory.
licensing
No rights reserved: CC0 1.0.
prior work
- The method of excluding hidden files in the topmost directory was introduced to me by an answer on Ask Ubuntu by Rinzwind and an answer on Server Fault by Alexander Pogrebnyak.
- The method of excluding specific files was introduced to me by an answer on Ask Ubuntu by Freedom_Ben.