markpbaggett
8/22/2016 - 6:43 PM

Rsync to Grab XML files in a path only

Rsync to Grab XML files in a path only

rsync -a -v -z --include='*/' --include='MODS.xml' --exclude='*' mbagget1@data.lib.utk.edu:/gwork/bridger/trace-td-test
 .
$ 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