exclude hidden files
Francis.Montagnac at inria.fr
Francis.Montagnac at inria.fr
Sat Aug 20 02:38:41 MDT 2011
On Fri, 19 Aug 2011 12:47:34 +0200 Ken Gillett wrote:
> I want to exclude from the sync ALL files that start with a dot, IOW
> hidden files. But using --exclude '.*' does funny things with
> directories (or at least I think it does). Is there a recognised
> correct way to do this?
Using --exclude '.*' should work.
Example:
$ tree -a a
a
`-- b
|-- bar
`-- .foo
1 directory, 2 files
$ rsync -vv -i -a --exclude '.*' a/ x
sending incremental file list
[sender] hiding file b/.foo because of pattern .*
created directory x
delta-transmission disabled for local transfer or --whole-file
cd+++++++++ ./
cd+++++++++ b/
>f+++++++++ b/bar
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 115 bytes received 38 bytes 306.00 bytes/sec
total size is 0 speedup is 0.00
Francis Montagnac
More information about the rsync
mailing list