Created
October 24, 2018 08:15
-
-
Save uptimizt/bfb6b0fa6bc6093fc59a4127e1c101ec to your computer and use it in GitHub Desktop.
Extract Sql.Gz File On Command Line (macos, linux)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gzip -d backup-20100910164109.sql.gz |
And? This is how it's typically used.
People don't usually unpack archives to look at the SQL commands, you typically need it in a database.
I just wanted to note, that your given command could produce an unexpected result and ruin someones day..
Well if they were copying commands off the Internet without understanding them they deserved it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The command that was provided by @juresaht2 is a bit more than what this gists is about..
Command
zcat backup-20100910164109.sql.gz | mysql -u root dbname
will extract the zip, but it will also pipe the output to mysql server, which is not expected by this "Extract Sql.Gz File On Command Line (macos, linux)" gists title.