how to exclude hidden files/directories

Martin Scharrer mailinglists at
Fri Dec 3 18:53:29 GMT 2004


On Thursday 02 December 2004 22:24, Hong Zhu wrote:
> Hi all,
> I'm rsync'ing all directories tree plus *.html and
> .htaccess files but excluding everything else.
> Although *.html files are indeed the only files get
> transferred, hidden files and directories like
> ".abc" also get transferred...
> The syntax I'm using is as following:
> rsync -av --include="*/" --include="*.html"
> --include=".htaccess" --exclude="*" /source/ /dest/

Here with version 2.6.3 (protocol version 28) it works fine.
No hidden files except .htaccess get transferred.

What version do you use? 
Try adding --exclude=".*" to your option.


More information about the rsync mailing list