Search

Top 60 Oracle Blogs

Recent comments

HOWTO: Merge files under Windows

Small “howto”, because I always forget.

Today I needed to merge to Linux tar files on Windows. I downloaded the two Oracle VM Templates for Oracle Business Intelligence Enterprise Edition (OBIEE). After unzipping them you get two tar files called

  • OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file1of2
  • OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file1of2

To be able to merge them and then “untar” those files, under Linux or Unix you would do something like:

 
cat #66cc66;">{file01#66cc66;">} #66cc66;">{file02#66cc66;">}  | tar -xvz
 
cat OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file1of2 OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file2of2| tar -xvz
.

…with other words, you would “cat” the first and second file into a file and then “untar”-ed it on the fly via the “tar -xvz”. In Windows you would do this via the following command, that is the first “cat” part, merging the files, via:

 
#b1b100; font-weight: bold;">copy /B #66cc66;">{file01#66cc66;">} #66cc66;">{file02#66cc66;">} #66cc66;">{newfile#66cc66;">}
 
#b1b100; font-weight: bold;">copy /B OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file1of2 + OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file2of2 OVM_EL4U5_X86_PVM_10gR3BIEE.tgz
.

the Windows equivalent of the Linux/Unix

 
cat #66cc66;">{file01#66cc66;">} #66cc66;">{file02#66cc66;">}  > #66cc66;">{newfile#66cc66;">}
 
cat OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file1of2 + OVM_EL4U5_X86_PVM_10gR3BIEE.tgz.file2of2 > OVM_EL4U5_X86_PVM_10gR3BIEE.tgz
.

So you the Windows statement will “merge & copy” them into the needed file, in my case file: “OVM_EL4U5_X86_PVM_10gR3BIEE.tgz”.

Now you can, with a (un)zip utility like “winrar”, “untar” the ” “OVM_EL4U5_X86_PVM_10gR3BIEE.tgz” file into its original content.