Include a directory inside an excluded one?

Wayne Davison wayned at
Sat Aug 22 09:27:32 MDT 2009

On Thu, Aug 20, 2009 at 08:41:40PM +0200, Nicolas KOWALSKI wrote:
> My problem is that I would like to synchronize a directory located
> inside "/Ma musique/", the one named "/Ma musique/iTunes/".

As you noticed, rsync will not synchronize anything whose parent dir
gets excluded.  To fix this, stop excluding the parent dir and instead
exclude the content of the dir (but after any includes from the dir):

  --include="/Ma musique/iTunes/" --exclude="/Ma musique/*"


More information about the rsync mailing list