Skip to content

Instantly share code, notes, and snippets.

@morungos
Created March 7, 2014 21:20
Show Gist options
  • Save morungos/9420347 to your computer and use it in GitHub Desktop.
Save morungos/9420347 to your computer and use it in GitHub Desktop.
Recursively search a directory of compressed XML files for something, using parallel stuff for performance
find . -name '*.xml.gz' -print0 | sort -z | xargs -r0 -I "{}" -P 4 sh -c "gzip -d -c {} | grep --label={} -H 1229467"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment