There is sometimes a need to split a large file into smaller ones for ease of operation and optimum memory utilization.When you split,you can read it using a normal text editor.To split large file into smaller ones in Linux,use split command.Just follow the steps below and you will be able to split large file into smaller files.Not all Operating Systems have such pre-assigned commands that you need to explore.
Type in the shell $ split -bytes=1m /path/to/large/file/path/to/output/file/prefix.Now the big file is split into smaller ones.Control the output file size by modifying the -bytes=1m to your wish.Use b, k, or m.b which represents bytes,k represent kilobytes,m represent megabytes.Now for restoring large original file,use the cat command and later just use the join command to get the file back type $ cat prefix* as NEW FILENAME.
[Linux]Cutting a file into several parts
Linux is full of utility tools allowing you to manipulate files. There is a very handy tool to split a file into several parts (for example to carry data on low capacity media).
command will create files - named xaa, xab, xac etc. - of 1440KB or less.
command may also be convenient for this purpose.
Published by jak58
Latest update on November 23, 2015 at 04:43 AM by ChristinaCCM.