how to exclude hidden files/directories

Hong Zhu hzhu at wesleyan.edu
Fri Dec 3 19:29:57 GMT 2004


Hi Martin,

Many thanks for testing it out! Sorry I wasn't clear.

Since I'm rsyncing the directory tree, the hidden 
directories like ".abc" also get transferred, how am 
I able to exclude hidden directories to be transferred? 
Hopefully this will also exclude those matched files 
under hidden directories to be transferred... I tried 
various combinations to exclude hidden directories, 
however not much luck...

Thanks a lot,
Hong

> -----Original Message-----
> From: rsync-bounces+hzhu=wesleyan.edu at lists.samba.org
> [mailto:rsync-bounces+hzhu=wesleyan.edu at lists.samba.org]On Behalf Of
> Martin Scharrer
> Sent: Friday, December 03, 2004 1:53 PM
> To: rsync at lists.samba.org
> Subject: Re: how to exclude hidden files/directories
> 
> 
> Hi,
> 
> 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.
> 
> best,
> Martin
> -- 
> To unsubscribe or change options: 
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html




More information about the rsync mailing list