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


 
Thread Tools Search this Thread
Operating Systems HP-UX How to split big file on HP-UX and join on Windows?
# 1  
Old 07-23-2013
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
# 2  
Old 07-23-2013
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 Smilie)


You could try a plain split on HP-UX and you might, get lucky with:-
Code:
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
# 3  
Old 07-23-2013
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.

Code:
7za a test.7z -v4g BIG_FILE

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

Thanks again!
# 4  
Old 07-23-2013
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.
# 5  
Old 07-23-2013
If it is already compressed, can you just binary FTP it? Winzip should be able to extract it.



Robin
# 6  
Old 07-23-2013
Quote:
Originally Posted by Corona688
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...
Code:
split -b 4g <BIGFILE>

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

Quote:
Originally Posted by rbatte1
If it is already compressed, can you just binary FTP it? Winzip should be able to extract it.
Robin
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.
# 7  
Old 07-23-2013
I suggest you try the cat from busybox...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Split a big file system to several files

Gents Actually I have question and i need your support. I have this NAS file system mounted as /coresys has size of 7 TB I need to Split this file system into several file systems as mount points I mean how to can I Split it professionally to different NAS mount points how to can I decide... (2 Replies)
Discussion started by: AbuAliiiiiiiiii
2 Replies

2. Shell Programming and Scripting

Split Big XML file Base on tag

HI I want to split file base on tag name. I have few header and footer on file <?xml version="1.33" encing="UTF-8"?> <bulkCmConfigDataFile" <xn:SubNetwork id="ONRM_ROOT"> <xn:MeContext id="PPP04156"> ... (4 Replies)
Discussion started by: pareshkp
4 Replies

3. Shell Programming and Scripting

Split a big file into multiple files using awk

this thread is a continuation from previous thread https://www.unix.com/shell-programming-and-scripting/223901-split-big-file-into-multiple-files-based-first-four-characters.html ..I am using awk to split file and I have a syntax error while executing the below code I am using AIX 7.2... (4 Replies)
Discussion started by: etldev
4 Replies

4. Shell Programming and Scripting

Split a big file into multiple files based on first four characters

I have a requirement to split a huge file to smaller text files based on first four characters which look like ABCD 1234 DFGH RREX : : : : : 0000 Each of these records are OF EQUAL bytes with a different internal layout based on the above first digit identifier.. Any help to start... (5 Replies)
Discussion started by: etldev
5 Replies

5. Shell Programming and Scripting

Need to Split Big XML into multiple xmls

Hi friends.. We have urgent requirement.We need to split the big xml having multiple orders into multiple xmls having each order in each xml. For Example In input XMl will be in following format with multiple line orders.. <OrderDetail BillToKey="20100805337" Createuserid="CreateGuestOrder"... (8 Replies)
Discussion started by: dprakash
8 Replies

6. UNIX for Advanced & Expert Users

Split a big file into two others files

Hello, i have a very big file that has more then 80 MBytes (100MBytes). So with my CVS Application I cannot commit this file (too Big) because it must have < 80 MBytes. How can I split this file into two others files, i think the AIX Unix command : split -b can do that, buit how is the right... (2 Replies)
Discussion started by: steiner
2 Replies

7. Shell Programming and Scripting

perl help to split big verilog file into smaller ones for each module

Hi I have a big verilog file with multiple modules. Each module begin with the code word 'module <module-name>(ports,...)' and end with the 'endmodule' keyword. Could you please suggest the best way to split each of these modules into multiple files? Thank you for the help. Example of... (7 Replies)
Discussion started by: return_user
7 Replies

8. Shell Programming and Scripting

Help Needed : Split one big file to multiple files

Hi friends, I have data in flat file as following, first filed is the customer number. We have almost 50-100 customers in the system 100 ABC A123 100 BVC D234 100 BNC N324 200 CBC A122 200 AVC D294 200 HNC N324 300 GBC A173 300 FVC D234 300 DNC N344 I want to split the file and... (5 Replies)
Discussion started by: monicasgupta
5 Replies

9. UNIX for Dummies Questions & Answers

Split BIG report using nawk

I have the following nawk script: nawk -F: '{ if($0 ~ "^Report No") {fl=1; i=0;} if(fl==1){data=$0; i++} if($0 ~ "^BE NO:") { fname = "reprot_"$2".lis"; gsub(" ","",fname); for(j=0;j<i;j++) print data > fname; fl=0; } else if(fl==0) print $0 > fname; }' filename When I try to apply... (1 Reply)
Discussion started by: raychu65
1 Replies

10. Shell Programming and Scripting

Split a Big Report.

Hi All, I am a newbie for Unix Script. I have report like the following: (file name: Report.txt): Report No.: AAA BE NO: 111 asfsdflsjdfklsdjfklsjfklsfsflsjdlk fsdfjsfkjsklfsfj Report No.: AAA BE NO: 111 sdfsdfjsdklfjsfkj fsdflkjsdfklsjkl Report No.: AAA (16 Replies)
Discussion started by: raychu65
16 Replies
Login or Register to Ask a Question