December 19, 2009

split - split big files into smaller files

While searching about spliting large file in smaller files I have found below mentioned command:

Syntax:

root :~# split -b 2000 FILENAME

split is the command
-b stands for bytes

2000b is nearly 2mb (you can change this to whatever you want too for size)
FILENAME is the filename of file you want to split.

Now, to get that many pieces BACK together again with the CAT command:

put all the "pieces" into one directory and then run the command

root :~# cat * > NEWFILE

No comments:

Post a Comment