Skip to main content
Menu
Home
Marco
Programmer/Developer

Main navigation

  • Drupal
  • Web Dev
  • App Dev
  • Servers
  • Projects
  • Products
  • Tools
  • Faith
Home
Marco
Programmer/Developer

Main navigation

  • Drupal
  • Web Dev
  • App Dev
  • Servers
  • Projects
  • Products
  • Tools
  • Faith

Find and Replace text in SQL files

Submitted by marcom on Fri, 12/22/2023 - 19:29
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 {} +
Tags
Linux
Ubuntu
SQL
  • Read more about Find and Replace text in SQL files
  • Add new comment

Combining Multiple SQL Files in MacOS

Submitted by marcom on Thu, 04/16/2020 - 09:34
MacOS Terminal

The Sequel Pro app only allows a single .sql or a compressed .sql.gz file to be imported, but what if you have hundreds of .sql files to import from your Drupal or WordPress backup?

Drupal sql file list

The solution is to combine the .sql file into one using the cat command.

Tags
MacOS
Terminal
SQL
  • Read more about Combining Multiple SQL Files in MacOS
  • Add new comment
Subscribe to SQL

Recent content

  • How to Decrypt an RSA Private Key Using OpenSSL
    1 week 2 days ago
  • How to remove submodule from Git
    8 months ago
  • Sort all directories based on their size
    1 year ago
  • Find and Replace text in SQL files
    1 year ago
  • Copy files with rsync in Linux
    1 year ago
  • Search text recursively in log files
    1 year ago
  • Proxy Domain to Another Server
    1 year ago
  • Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in wp-includes/wp-db.php in WordPress in XAMPP environment
    1 year 4 months ago
  • How To Keep Passwords Safe
    1 year ago
  • How to Convert DER Encoded Certificates to PEM
    1 year ago

Search

Google Adsense

About Marco

Full stack developer and systems administrator experienced in working in software design, programming, web and app development. Built award-winning websites, intranets, and mobile apps for a variety of clients, working at Upanup.

Footer menu

  • Drupal
  • Github
  • Facebook
  • LinkedIn
  • Contact

Powered by Drupal