Thanks guys!! All that helped me, i got it to work.
I used the script below, and added some things , well, a friend of mine
came up with it:
my $size=(stat('/usr/messages.sorted'))[7];
my $chunksize = 10 * 1024 *1024 ; # mb
my $split_into = $size/$chunksize;
That makes every chunk 10megabyte. So
> set size arguments
> set input file
> set output file
>
> open the file
> read the content
> print line of the content to $output file
> check size of $output file
> continue if not to big yet
> else
> check which files already live in the target directory (.1 .2 .3 .4 .5 etc)
> rotate file to $
> Hello there,
>
> I have a question about how i can split files.
>
> Let's say i have some very large files. (2gb for example)
> and i want to split them into 650mb files. (they are plaintekst only)
>
Depending on the size of the files you may need a Perl enabled with
"large file support" p