wood burning stoves*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 388
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: 388
Cool, thanks guys
 
 
subject: Need a script to handle big files
 
Similar Threads
WA #1.....word association
Enable isn't working in script
how to get sum for dynamic checkboxes
text field validations
what shell is this