• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 695
  • Last Modified:

Windows 7 extract from .tar and concatenate


I received a .tar MySql backup that has a folder with multiple .gz files. I need to extract each of the .gz mySql.sql files from the .tar and concatenate them. I'm on windows 7 and the Linux command I was provided is:

for file in *.sql.gz; do zcat $file | mysql $YOUR_INTERNAL_NEW_COPY_DB$; done

Hoping someone can translate this to a windows compatible batch or winRar/7Zip command.

  • 2
1 Solution
GeisrudSystems AdministratorCommented:
I recently used "Peazip" to work with a .tar.gz file successfully.  The site lists split/join files as a feature, though I haven't used it.  Hope that helps.

GeisrudSystems AdministratorCommented:
Were you able to try the Peazip feature I mentioned?
fredjonzeTwoAuthor Commented:
I did try Peazip. The join function does not appear to be appropriate for the use I need. What I had to end up doing was extracting the 200+ separate .gz MySql tables to a directory and then use a dos command to concatenate them all. Not the one command solution I was looking for that appears to be usable in Linux.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now