From: Avdi Grimm Date: 2008-04-29T01:56:30+09:00 Subject: Re: Transpose a large file(>2GB) On Mon, Apr 28, 2008 at 12:47 PM, Avdi Grimm wrote: > fseek to the end of the file. fseek backwards by a nice round number > like 4k. Read in that exact number of bytes. Transpose it. Write > the transposed block to your output file. Then fseek back 2*4k. > Read, transpose, write. fseek back 3*4k. Etc. Rinse and repeat to > the beginning of the file. Of course, if you're transposing lines, that's trickier. -- Avdi Home: http://avdi.org Developer Blog: http://avdi.org/devblog/ Twitter: http://twitter.com/avdi Journal: http://avdi.livejournal.com