-
-
Save aiiddqd/bfb6b0fa6bc6093fc59a4127e1c101ec to your computer and use it in GitHub Desktop.
gzip -d backup-20100910164109.sql.gz |
Thanks!
Thanks
Thanks!
thanks mate !
zcat backup-20100910164109.sql.gz | mysql -u root dbname
gzip -d changes the file.
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.
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.
thanks