Last active
August 29, 2015 14:04
-
-
Save walkermatt/99181c8454233fca2c8d to your computer and use it in GitHub Desktop.
GNU Parallel all the things!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /var/data/osmm/ -type f -print0 | \ | |
parallel -0 python loader.py loader.config "src_dir={}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time for FILE in `find . -name '*.shp' -not -path "./tools/*"`; do \ | |
BASE=`basename $FILE .shp`; \ | |
shp2pgsql -W LATIN1 -s 4326 -I $FILE world.$BASE \ | |
| psql; done | |
real 6m14.569s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time find . -name '*.shp' -not -path "./tools/*" \ | |
| parallel "shp2pgsql -W LATIN1 -s 4326 -I {} world.{/.} | psql" | |
real 3m11.030s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment