On Sat, 20 Aug 2011, Ken Gillett wrote:

OK, thanks for that. For some reason that escapes me now, I was sure that [--exclude '.*'] caused problems.

I'll have a go with just '.*'.

My guess is that you were once trying to sync a directory containing hidden (dot) directories. So, e.g.:

$ treeish somedir
somedir/
 └─┬─ .hidden/
   │   ├── .hidden-file
   │   └── normal-file
   └─ normal/
       ├── .hidden-file
       └── normal-file

Even though normal-file in somedir/.hidden/ doesn't match '.*' it's excluded, because its parent directory ( somedir/.hidden/ ) has been excluded.

In that case, you can add:

--include='.*/'   <-- include things matching .* which are directories
--exclude='.*'    <-- exclude things matching .*

Since includes trump later excludes, that keeps hidden directories, but discards hidden files.

--
Best,
Ben
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to