Tag: xargs
-
MySQL dump tables matching a pattern
Quick command to dump all tables matching a like pattern. In the example drop tables option is added with xargs. mysql $DB -u$USERNAME -p$PASSWORD -e ‘show tables like “$LIKE%”‘ | grep -v Tables_in | xargs mysqldump –add-drop-table $DB -u$USERNAME -p$PASSWORD
-
Recursively remove all .svn directories with xargs
With xargs you can joing the output of one command to the input of another when a pipe doesn’t work. Check out this example: find . -name .svn -print0 | xargs -0 rm -rf