How to split big file on HP-UX and join on Windows?

Hi HP-admins,

I have 120GB file on HP-UX and need to split to 4GB pieces and join them on Windows.

As I don't want to use zipsplit, tried to use split command and join on windows using "copy /b" but it doesn't work (It merges and creates new file but file is corrupt)

What is the correct way to join UNIX split files on Windows? ( "copy /b" not working correctly)

Or is there solution for it?

Thanks

What is the content of the file? "Is it plain ASCII text?", I suppose is the real question. If this is a data-file, compiled code or other 'binary' file, then I doubt split is the right things for it as joining up again will probably insert CRLF through it.

Can you not compress the file? Winzip will open that type of file. As an alternate, you can buy PKZip for Unix from PKWare, and that will give you the options to split it. We bought it to compress on MVS/ZOS and extract on AIX and it worked a treat. (No commission is paid to me if you purchase it :rolleyes:)

You could try a plain split on HP-UX and you might, get lucky with:-

C:\> type file_part.1 file_part.2 file_part.3 file_part.4 file_part.5 > whole_file

The DOS type is similar to the Unix cat, so I'm hopeful, but no guarantees.

I've never tried, but it may do it for free.

Robin
Liverpool/Blackburn
UK

Thanks rbatte1 for your reply.

The file is binary and already compressed.

I tried both copy and type but none of them worked with "split" of HP-UX.

I later tried p7zip on HP-UX and was only able to compress with it but in-built split function doesn't work.

The "-v" option to split volume is not working.

7za a test.7z -v4g BIG_FILE

Buying PKZip is not an option but will propose it to management.

Thanks again!

How exactly did you split the file? What did you type? If this doesn't work, it won't matter what you do on the windows end...

You can try the cat from busybox, start it with busybox bash and you will have a bourne shell with proper * expansion and many commands available.

If it is already compressed, can you just binary FTP it? Winzip should be able to extract it.

Robin

split -b 4g <BIGFILE> 

This above command worked fine and created split files named xaa, xab, xac ....

As FTP disconnects somewhere in between while transferring huge 120GB compressed file, I consider the option of splitting, transfer and then join them on Windows box.

I suggest you try the cat from busybox...