Skip to main content
3 of 4
added 50 characters in body
Chris Davies
  • 128.2k
  • 16
  • 179
  • 324

You are correct.

If you're using a shell such as bash you can tell it to have * match on dot files as well as usual ones:

shopt -s dotglob
rsync -rt source_dir/* target_dir/

I've added a trailing slash to the target so that it's always considered as a directory - even if the wildcard expands only to a single item. At the other end of the scale, you may encounter problems with the shell enumerating the results if * matches a (very) large number of files.

Chris Davies
  • 128.2k
  • 16
  • 179
  • 324