Operating System - HP-UX
1753878 Members
7245 Online
108809 Solutions
New Discussion юеВ

Joining files created by the SPLIT command

 
SOLVED
Go to solution
Alexander Laing
Advisor

Joining files created by the SPLIT command

Hello,

I have a file named "backup.tar" file that is greater that 2Gig. When trying to dump the file to tape, using the "tar" command, the error occurs indicating that the file is more than 2Gig.

To get around this problem I used the UNIX "split" command to split the backup.tar file in to two 1Gig files - backup01.tar and backup02.tar.

What I would like to know is that for recovery purposes, after the two tar files have been restored from tape, how do I properly join them back to form the one "backup.tar" file?

Thanks in Advance.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Joining files created by the SPLIT command

Shalom Alexander,

Please make sure the filesystem you are assembling these files on permits largefiles.
cp backup01.tar > backup.tar
cat backup02.tar >> backup.tar

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
melvyn burnard
Honored Contributor
Solution

Re: Joining files created by the SPLIT command

try :
cat backup01.tar backup02.tar > backup.tar
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
A. Clay Stephenson
Acclaimed Contributor

Re: Joining files created by the SPLIT command

All you have to do is cat them.

cat backup.01.tar backup02.tar > backup.tar

Split creates filenames that are lexically ordered, eg, myfileaa, myfileab, myfileac ...

so that

cat myfile* > myfile does just what you want to do.
If it ain't broke, I can fix that.
Alexander Laing
Advisor

Re: Joining files created by the SPLIT command

Thanks guys, for your quick response.

The suggestion worked.