Operating System - HP-UX
1834019 Members
2892 Online
110063 Solutions
New Discussion

break up a large text file

 
SOLVED
Go to solution
walid salah faroun
Occasional Advisor

break up a large text file

I am hoping somebody can help me in a script that would take a large test file 280MB file with over 1.4 million lines and break it up into 12 or so files based on a 64999 lines per file.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: break up a large text file

split -l 64999 myfile should do it for you. Man split for details.
If it ain't broke, I can fix that.
curt larson_1
Honored Contributor

Re: break up a large text file

take a look at the split command

split -l 65000 fileName
walid salah faroun
Occasional Advisor

Re: break up a large text file

Thanks for both of you - it's easy enough and did the job for me.