Skip to content

Instantly share code, notes, and snippets.

@bishwanathjha
Last active October 11, 2021 06:05
Show Gist options
  • Save bishwanathjha/a9cef09fe4d530e27a228b80619d98a3 to your computer and use it in GitHub Desktop.
Save bishwanathjha/a9cef09fe4d530e27a228b80619d98a3 to your computer and use it in GitHub Desktop.
Remove large insert statements from mysql dump file
# I am going to remove the activies insert from sql file because that huge aroudn 500MB
# Below command will create a new sql file by removing the activities insert query
sed '/INSERT INTO `activities`/d;/INSERT INTO `reconciliation_statement`/d;/INSERT INTO `activity_actions`/d' mydb.sql > reduced.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment