|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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 ;-) --- Cerbere |
|
#2
|
|||
|
|||
|
try "man split":
split -b700m access_log access.part. should work ![]()
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
Thanks M.Hirsch,
That's exactly what I was looking for. I was just about to start playing with the dd command. --- Cerbere |
|
#4
|
|||
|
|||
|
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? ![]() Grüsse, M.Hirsch |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Splitting big files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|