3

Possible Duplicate:
Pipe gunzip and mysql to gunzip a dump and import it

i have a .gz file of an sql dump. at the moment i extract it to its own file (ie dump.sql.gz extracted to dump.sql) then i import that file, then once its done i delete the file.

how can i just import without having to make / delete the sql file?

(im on unix btw)

1 Answers1

4

If the import tool can read from a pipe you could use zcat

$> zcat dump.sql.gz | import_tool

Nifle
  • 34,998