title: Use rsync to copy only hidden files
body: <p>I want to back up all the hidden files and directories in my homedir using rsync, but not the non-hidden files and directories.</p>
  
  <p>For example, given this directory listing:</p>
  
  <pre><code>drwxr-xr-x   7 sophie  sophie  238 31 Mar 08:45 .
  drwxr-xr-x  15 sophie  sophie  510 31 Mar 08:14 ..
  -rw-r--r--   1 sophie  sophie    4 31 Mar 08:12 .foo
  drwxr-xr-x   3 sophie  sophie  102 31 Mar 08:45 .hiddendir
  drwxr-xr-x   4 sophie  sophie  136 31 Mar 08:13 VisibleDirectory
  -rw-r--r--   1 sophie  sophie    9 31 Mar 08:13 VisibleFile
  </code></pre>
  
  <p>I want to back up .foo, .hiddendir, and all the contents of .hiddendir whether they are hidden or not. I don't want to back up VisibleDirectory or VisibleFile.</p>
  
  <p>All the incantations I have come up with back up ".", and therefore all its contents including VisibleFile and VisibleDirectory, and I can't figure out how to exclude it. Please help!</p>
  
  <p>I'm using Mac OS X 10.5.6 (Leopard) and rsync version 2.6.9 protocol version 29.</p>