Solved

Windows 7 extract from .tar and concatenate

Posted on 2012-03-15
5
654 Views
Last Modified: 2012-04-26
Hi,

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.

Thx,
Fred
0
Comment
Question by:fredjonzeTwo
  • 2
5 Comments
 
LVL 14

Expert Comment

by:Geisrud
ID: 37726790
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.

http://www.peazip.org/download-installer-p-windows.html
0
 
LVL 14

Expert Comment

by:Geisrud
ID: 37757531
Were you able to try the Peazip feature I mentioned?
0
 

Accepted Solution

by:
fredjonzeTwo earned 0 total points
ID: 37757551
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.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question