[Tfug] joining two large files on disk...

Matt Jacob matt at mattjacob.com
Mon Jun 14 13:48:29 MST 2010


On 6/14/10 1:34 PM, JD Rogers wrote:
> I'm curious if anyone knows a way to effectively do a "cat file2>>
> file1" to merge two files, but without rewriting the data on disk?

Without rewriting the data on disk? How would you possibly store the 
concatenated file, then? You could do `cat file1 file2 > newfile`, but I 
have a feeling that this isn't what you're thinking of.

I'm gonna go out on a limb here and throw out an absolute, but I don't 
think there's any way to concatenate two (or more) files and store the 
result without writing *something* out to disk. For giggles, you can 
concatenate them to stdout all you want, though... ;-)

Matt




More information about the tfug mailing list