How to split the large files in to small files? Print

  • 3

There  is simple syntax given below for splitting large file into several small size files.

Fire the following command from shell.

$ split –bytes=1m /path/to/large/file
/path/to/output/file/prefix

Just simple.

You have done it. You can change the output file size by changing -bytes =1m to any desired value You can use b, k, or m. b represent bytes, k represent kilobytes, m represent megabytes.

To restore the original file you can use cat command.

cat prefix* > NEWFILENAME.


Was this answer helpful?

« Back