I have a single huge java application log file which is unable to be opened in main memory. I wanted to split this file into equivalent parts enough to be opened in the main memory. How can I do this ? And how do I ensure that the last line split isn't in the middle but end of the line ?
Asked
Active
Viewed 166 times
1 Answers
1
You want to manipulate a large text file, the fact that it came from Java in not important.
On Unix you can use the command wc to discover how many lines are in the file and the command split to split the file up. On other platforms such as windows there are implementations of these commands, for example from cygwin.
But why do you want to load pieces into memory? If you are searching for something use tools such as baregrap and file viewers.

djna
- 54,992
- 14
- 74
- 117