How to merge compressed files under Linux/Unix/Windows


If you want to merge several compressed files into one file, do as follow:

Under Linux/Unix

cat “<filename1>” “<filename2>” “<filenamen>” > “<filename>”

example

# cat “NetBackup_7.1_CLIENTS_tar-gz.1of2” “NetBackup_7.1_CLIENTS_tar-gz.2of2” > “NetBackup_7.1_CLIENTS.tar.gz”
# ls -lrt
total 7867428
-rw-r–r–. 1 root root 1430244430 Dec  8 17:39 NetBackup_7.1_LinuxR_x86_64.tar.gz
-rw-r–r–. 1 root root 1866465280 Dec  8 17:43 NetBackup_7.1_CLIENTS_tar-gz.1of2
-rw-r–r–. 1 root root 1446523985 Dec  8 17:43 NetBackup_7.1_CLIENTS_tar-gz.2of2
-rw-r–r–. 1 root root 3312989265 Feb 22 12:26 NetBackup_7.1_CLIENTS.tar.gz
# file NetBackup_7.1_CLIENTS.tar.gz
NetBackup_7.1_CLIENTS.tar.gz: gzip compressed data, was “NetBackup_7.1_CLIENTS.tar”, from Unix, last modified: Mon Feb 14 19:44:10 2011

Under Windows

copy /B  “<filename1>” +  “<filename2>” + “<filenamen>” “<filename>”

or

copy /B  “<filename1>” +  “<filename2>” + “<filenamen>” PATH:\”<filename>”

example

F:\Symantec\NetBackup\7.1\Pkgs>copy /B “NetBackup_7.1_Win_zip.1of2” + “NetBackup_7.1_Win_zip.2of2” “Netbackup_7.1.zip”
NetBackup_7.1_Win_zip.1of2
NetBackup_7.1_Win_zip.2of2
        1 file(s) copied.

or

F:\Symantec\NetBackup\7.1\Pkgs>copy /B “NetBackup_7.1_Win_zip.1of2” + “NetBackup_7.1_Win_zip.2of2″ d:\”NetBackup_7_1.zip”
NetBackup_7.1_Win_zip.1of2
NetBackup_7.1_Win_zip.2of2
        1 file(s) copied.

 

You’re done!

Comments are closed.