Split A Large File Into Small Files

by GOKILAVANI 2014-05-27 09:49:55

To split a large file into several smaller files, user can use a split command (on linux).

split --bytes=SIZE largeFile smallFilePrefix

Example - User have large file of 50M and to split it into several small 1M files then we can use

split --bytes=1M largeFile smallFile

A lot of smallFile* files was generated. 

To count those small file below code is used.

ls smallFile* | wc -l

we get 53 small files using the above command of them.

If user wish to restore the original file, then use

cat smallFile* > originalFile
 
 
1012
like
0
dislike
0
mail
flag

You must LOGIN to add comments