Skip to content

Instantly share code, notes, and snippets.

@ncimino
Created August 10, 2014 00:21
Show Gist options
  • Save ncimino/0536da3dd0597b411131 to your computer and use it in GitHub Desktop.
Save ncimino/0536da3dd0597b411131 to your computer and use it in GitHub Desktop.
Syncing parts of directories with rsync
# sync all files starting with 0-9 or a-n or A-N
rsync -vram -f'+ [0-9a-nA-N]*' -f'+ */' -f'- *' /src /dest1
# sync all files starting with m-z or M-Z
rsync -vram -f'+ [m-zM-Z]*' -f'+ */' -f'- *' /src /dest2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment