-
How To: Splitting large text files into smaller ones
my:
Let’s say you have a huge text file with couple million lines. Now you want to split it up into 100, 200, or 300 line files. Bash makes it pretty easy with
split.In Bash:
split -l 500 file.txtThat splits up the file
file.txtinto 500 line chunks. What is produced are files such asxaa,xab,xacand so on.Be sure to do
man splitfor more options.