[Cialug] rsync --recursive *.foo
Josh More
morej at alliancetechnologies.net
Wed Aug 10 12:46:15 CDT 2005
>From the man page:
--exclude=PATTERN exclude files matching PATTERN
--exclude-from=FILE exclude patterns listed in FILE
--include=PATTERN don't exclude files matching PATTERN
--include-from=FILE don't exclude patterns listed in
FILE
--files-from=FILE read FILE for list of source-file
names
So you might be able to do an --exclude='*' --include='*.foo'
You need the * in single quotes so that the shell will not expand it.
That is what is harming you now.
If this fails, you can use find to generate a list of matches and feed
rsync a file list.
--
-Josh More, RHCE, CISSP, NCLP
morej at alliancetechnologies.net
515-245-7701
>>>dave at visionary.com 08/10/05 12:26 pm >>>
I want to do an rsync like so:
rsync -avze ssh --recursive *.foo user at host:/location
(IIRC, recursive is the default behavior, just putting it there to
explicitly show that I really want it to be recursive).
The problem with this is because of the *.foo wildcard, it only uploads
*.foo in the current directory, and not any sub directories because
they're not named *.foo.
I've had the same problem with tar. Is there something simple I'm
overlooking here? It seems stupid to me that the wildcard applies to
both the files, and the directory names.
My work-around is to change change my rsync script to have several
--exclude *.bar parameters, which is a pain.
-dc
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20050810/2091e0f1/attachment-0001.html
More information about the Cialug
mailing list