Home » Blog » Software Development » Using rsync to syncronize folder structure with file filter

Using rsync to syncronize folder structure with file filter

I used this command to sync a folder structure with rsync in combination with a file filter:

rsync -avz --include '*/' --include '**/HERE_THE_PATTERN' --exclude='*' DIR_TO_SYNC REMOTEHOST:TARGETDIR

For a dry-run, you could add the -n parameter to the call above:

rsync -anvz --include '*/' --include '**/HERE_THE_PATTERN' --exclude='*' DIR_TO_SYNC REMOTEHOST:TARGETDIR

Check Also

Xarcade2Jstick supports new Tri-Mode Tanksticks

X-Arcade Dual Joystick If you happen to own an X-Arcade Tankstick this post might be …

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use Cookies and similar technology to collect and analyse information about the users of this website. We use this information to enhance the content, advertising and other services available on the site. Please click ‘Accept cookies’ to consent to the use of this technology by petrockblock. You can manage your preferences at any time by visiting our Cookies Policy page.