This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Need a script to handle big files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Need a script to handle big files" Watch "Need a script to handle big files" New topic
Author

Need a script to handle big files

M Burke
Ranch Hand

Joined: Jun 25, 2004
Posts: 395
I have a file that has 2 million rows (Database import). Its part of a batch process and is refreshed once a month. I would like to break it up into 100K row chunks. Anyone know of a script that does this? Thanks
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923


will generate files called PREFIXaa, PREFIXab, PREFIXac ... of 100000 lines each.


http://home.arcor.de/hirnstrom/bewerbung
Jay Suttiruttana
Ranch Hand

Joined: Aug 17, 2006
Posts: 36
Continue from Stefan post.

The "split" is a tool available in UNIX and Linux OS environment. If you're in MS Windows environment, there is a GUI tool called JR Split File (http://www.spadixbd.com/freetools/index.htm).
M Burke
Ranch Hand

Joined: Jun 25, 2004
Posts: 395
Cool, thanks guys
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need a script to handle big files
 
jQuery in Action, 3rd edition