Saturday, October 31, 2009

Split and Join files in liinux

split is the command used to split large files in linux


let us split the file

music.mp3

inorder to split it to 1mb each the following command is used

split -b 1M music.mp3

here this -b refers to splitting files based on bytes, files can be splitted based on lines too it is by giving -l

this will create files named xaa xab xac ........

this can later be combined to a single file called music-combined.mp3 as

cat xa* > music-combined.mp3


more information in this regard can be obtained my refferring to the man file of split


man split

No comments:

Post a Comment