Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a big file and want to split the file on the basis of size.

For e.g.

Main file: 10 Mb and then I want to split it into 2 mb parts. But the issue is if I use split -b it breaks the last line in part files. A small correction in size of splitted file is acceptable (to complete last line).

share|improve this question

migrated from stackoverflow.com Jun 8 '13 at 10:36

This question came from our site for professional and enthusiast programmers.

5  
At least GNU split has a -C option for this specific purpose. –  tripleee Jun 7 '13 at 7:30

1 Answer 1

up vote 0 down vote accepted

Got the fix. I Used:

split -C "size" <filename>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.