[Cialug] rsync --recursive *.foo

David Champion dave at visionary.com
Wed Aug 10 12:26:58 CDT 2005


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



More information about the Cialug mailing list