Find and Replace text in SQL files

Library Database

SQL files can be huge in sizes to load onto an editor in order to fix queries that is preventing it to be imported properly. Instead of loading onto an editor, you can simply execute a find a replace using the find app.

find . -type f -name database.sql -exec sed -i '' s/[text-to-find]/[text-to-replace]/g {} +

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.