selecting files from different subdirectories
Lorenzo Bettini
bettini at dsi.unifi.it
Sat Aug 24 06:55:00 EST 2002
Hi
I would need to synschronize some Netscape stuff to a server ("roaming
profiles" are not included anymore in the recent versions of Netscape).
In particular I'd like to synchronize bookmarks, address book and mail
filters.
So I need to synchronize ONLY the following three files (that are in the
mozilla directory work/mozilla) to the remote server (in the directory
save/mozilla/) :
/bookmarks.html
abook.mab
ImapMail/my.remote.server/rules.dat
The first attempt was to use the following command after cd to mozilla
directory (this is for committing changes to the server)
rsync -e ssh -azu --include "*/" --include-from include-files
--exclude="*" . foo at my.remote.server:save/mozilla/
where the contents of include-files is exactly the three lines above.
This works but the problem is that on the directory save/mozilla/ on the
server also the other directories (Cache, chrome, etc.) are created
(although they are empty).
After reading some past postings I tried with this solution
rsync -e ssh -avz --include-from=test_includes .
foo at my.remote.server:save/mozilla/
where test_includes is the following file
+ /bookmarks.html
+ /abook.mab
+ /ImapMail/my.remote.server/rules.dat
- /*
but now only the files bookmarks.html and abook.mab are copied.
I thought that complete paths can be specified, am I wrong?
Basically I'm wondering which is the right way to copy ONLY some files
possibly in some subdirectories.
many thanks in advance
cheers
Lorenzo
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD student in Computer Science |
| Dip. Sistemi e Informatica, Univ. di Firenze |
| Tel +39 055 4796741, Fax +39 055 4796730 |
| Florence - Italy (Linux User # 158233) |
| Home Page : http://www.lorenzobettini.it |
| E-Mail : bettini at dsi.unifi.it |
| http://music.dsi.unifi.it XKlaim language |
| http://www.lorenzobettini.it/purple Cover Band |
| http://www.gnu.org/software/src-highlite |
| http://www.gnu.org/software/gengetopt |
+-----------------------------------------------------+
More information about the rsync
mailing list