Skip to content

Instantly share code, notes, and snippets.

@markpbaggett
Last active January 17, 2017 17:42
Show Gist options
  • Save markpbaggett/9ea4ababb89e979f4985b7ec344dbd12 to your computer and use it in GitHub Desktop.
Save markpbaggett/9ea4ababb89e979f4985b7ec344dbd12 to your computer and use it in GitHub Desktop.
Rsync to Grab XML files in a path only
$ rsync -a -v -z --include='*/' --include='*.xml' --exclude='*' user@server:/path/to/files/ local/path/to/wherever/
# -a = recursive, timestamps, etc, etc
# -v = verbose (not really necessary, but why not?)
# -z = compression because we can!
# --include='*/' = include all directories!
# --include='*.xml' = include this kind of file, wherever they occur in those directories!
# --exclude='*' = exclude everything *but* the stuff we're including!
# you know the rest
rsync -a -v -z --include='*/' --include='MODS.xml' --exclude='*' mbagget1@data.lib.utk.edu:/gwork/bridger/trace-td-test
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment