Extract sql.gz File

User
extract sql.gz file
Assistant
To extract a `.sql.gz` file (a gzipped SQL file), you can use the `gunzip` or `gzip -d` command on Linux, macOS, or WSL (Windows Subsystem for Linux), or use tools like 7-Zip on Windows.

### **Option 1: Using Command Line (Linux/macOS/WSL/PowerShell with gzip installed)**

gunzip filename.sql.gz

Or:

gzip -d filename.sql.gz

This will extract and give you a file named `filename.sql`.

### **Option 2: Using 7-Zip on Windows**

1. Right-click on the `.sql.gz` file.
2. Choose `7-Zip` → `Extract Here` or `Extract to "filename.sql"`.
3. You’ll get a `.sql` file in the same directory.

Let me know if you want to automate this with a script or import the `.sql` file into a MySQL database afterward.

Leave a Comment

Your email address will not be published. Required fields are marked *