Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 132010

How to split a large file into multiple smaller files in Linux


If you have a very large file and want to split into multiple smaller files, split command can do the job for you.

# split -l 10 text.txt

The above command split the file text.txt into a multiple files (xaa, xab, xac...), which contains at most 10 lines per file.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>