Gentoo Archives: gentoo-user

From: Kfir Lavi <lavi.kfir@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: rsync include exclude of regex conundrum
Date: Sun, 27 Mar 2011 12:16:26
Message-Id: AANLkTikipJ5UmrO1PJ7-W5s5HrznQbYo4awGOnZDaAe6@mail.gmail.com
In Reply to: [gentoo-user] rsync include exclude of regex conundrum by Kfir Lavi
1 On Thu, Mar 24, 2011 at 3:24 PM, Kfir Lavi <lavi.kfir@×××××.com> wrote:
2 > Hi,
3 > I want to rsync all the directories and files that contain the date
4 > "2011.03.03".
5 > Everything else should not be copied.
6 > I did a lot of experiments and read web pages, but can't solve this
7 > conundrum.
8 >
9 > kfir@goofy /tmp/rsync.test $ find
10 > .
11 > ./b
12 > ./a
13 > ./a/aaa
14 > ./a/aaa/2011.03.03
15 > ./a/2011.03.04
16 > ./a/2011.03.03
17 > kfir@goofy /tmp/rsync.test $ rsync -avvn --include "*" --include
18 > "**2011.03.03**" --exclude "*" a/ b/
19 > sending incremental file list
20 > [sender] showing directory aaa because of pattern *
21 > [sender] showing directory 2011.03.04 because of pattern *
22 > [sender] showing directory 2011.03.03 because of pattern *
23 > [sender] showing file aaa/2011.03.03 because of pattern *
24 > delta-transmission disabled for local transfer or --whole-file
25 > ./
26 > 2011.03.03/
27 > 2011.03.04/
28 > aaa/
29 > aaa/2011.03.03
30 > total: matches=0  hash_hits=0  false_alarms=0 data=0
31 >
32 > sent 135 bytes  received 30 bytes  330.00 bytes/sec
33 > total size is 0  speedup is 0.00 (DRY RUN)
34 >
35 > kfir@goofy /tmp/rsync.test $ rsync -av  --include "2011.03.03"  a b -v
36 > sending incremental file list
37 > [sender] showing directory a/2011.03.03 because of pattern 2011.03.03
38 > [sender] showing file a/aaa/2011.03.03 because of pattern 2011.03.03
39 > delta-transmission disabled for local transfer or --whole-file
40 > a/
41 > a/2011.03.03/
42 > a/2011.03.04/
43 > a/aaa/
44 > a/aaa/2011.03.03
45 >            0 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/5)
46 > total: matches=0  hash_hits=0  false_alarms=0 data=0
47 >
48 > sent 179 bytes  received 47 bytes  452.00 bytes/sec
49 > total size is 0  speedup is 0.00
50 >
51 > kfir@goofy /tmp/rsync.test $ rsync -avvn --include "*" --include
52 > "**2011.03.03**" --exclude "*" a b
53 > sending incremental file list
54 > [sender] showing directory a because of pattern *
55 > [sender] showing directory a/aaa because of pattern *
56 > [sender] showing directory a/2011.03.04 because of pattern *
57 > [sender] showing directory a/2011.03.03 because of pattern *
58 > [sender] showing file a/aaa/2011.03.03 because of pattern *
59 > delta-transmission disabled for local transfer or --whole-file
60 > a/aaa/2011.03.03 is uptodate
61 > total: matches=0  hash_hits=0  false_alarms=0 data=0
62 >
63 > sent 143 bytes  received 31 bytes  348.00 bytes/sec
64 > total size is 0  speedup is 0.00 (DRY RUN)
65 >
66 > kfir@goofy /tmp/rsync.test $ rsync -avvn --include "*/" --include
67 > "**2011.03.03**" --exclude "*" a b
68 > sending incremental file list
69 > [sender] showing directory a because of pattern */
70 > [sender] showing directory a/aaa because of pattern */
71 > [sender] showing directory a/2011.03.04 because of pattern */
72 > [sender] showing directory a/2011.03.03 because of pattern */
73 > [sender] showing file a/aaa/2011.03.03 because of pattern **2011.03.03**
74 > delta-transmission disabled for local transfer or --whole-file
75 > a/aaa/2011.03.03 is uptodate
76 > total: matches=0  hash_hits=0  false_alarms=0 data=0
77 >
78 > sent 143 bytes  received 31 bytes  348.00 bytes/sec
79 > total size is 0  speedup is 0.00 (DRY RUN)
80 >
81 >
82 > Hope it is solvable.
83 > Regards,
84 > Kfir
85 >
86
87 Bump,
88
89 No body uses rsync?
90
91 Kfir

Replies

Subject Author
[gentoo-user] Re: rsync include exclude of regex conundrum Kfir Lavi <lavi.kfir@×××××.com>