April 16th, 2002, 06:21 PM
Splitting big files
Can anyone tell me a simple way to split big files in linux?
I have an access log that is over 1 Gig in size and I want to split it into a 700meg chunk (that I can burn to a CD) and whatever is left over I'll leave as the access log.
I really don't think I want to try this with vi ;-)
April 20th, 2002, 09:07 AM
try "man split":
split -b700m access_log access.part.
April 21st, 2002, 06:20 PM
That's exactly what I was looking for.
I was just about to start playing with the dd command.
April 22nd, 2002, 12:18 PM
dd can do the same job too.
you could do:
dd if=access_log of=acces.part.01 bs=1024k count=700 skip=0
dd if=access_log of=acces.part.02 bs=1024k count=700 skip=700
dd if=access_log of=acces.part.03 bs=1024k count=700 skip=1400
... i.e. put it inside a for-loop ....
(untested, maybe the syntax slightly differs)
but now that we have "split", why?