Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

6  
At least GNU split has a -C option for this specific purpose. – tripleee Jun 7 '13 at 7:30
up vote 2 down vote accepted

Got the fix. I Used:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .