A few days ago I need to split some large apache log files (1Gb log file) into several smaller file so I can read it using normal text editor for further investigating the mod_limitipconn purposes. To split large file into several smaller files, you can use split command in linux. Just follow the steps below and you will be able to split large file into smaller files.
{code}$ split –bytes=1m /path/to/large/file /path/to/output/file/prefix{/code}
Done. You just split your large file into several smaller files. You can also change the output file size by changing the –bytes=1m to your preference. 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. To join all the smaller file to restore the original file type :
{code}cat prefix* > NEWFILENAME{/code}