[ILUG] Something that would virtually merge 2 files ?

Frank Peelo f26p at eircom.net
Thu Aug 2 11:17:58 IST 2007


nexor wrote:
> Hello !
> 
> I had an interesting problem recently:
> A system booted from Live CD, so limited storage, no external storage
> and no partition I could use on local system. Now, on this Live DVD
> there was a file I had to use. Because the file was 3 GB big, it was
> split into 2GB+1GB files. 
> Because of not having so much temporary space I couldn't simply copy and
> merge those 2 files into one. 
> Have you ever seen / heard about something that would merge files into
> bigger, concatenated one - but only in a 'virtual' way, so the new file
> would not really eat up any space ?


Pardon me if this is obvious, but how do you need to use the file? 
Stream it into an application, or do you need random access? If the 
former, will cat not read the two parts one after the other and then 
pipe it into an application? Or perhaps you could use mkfifo. You can 
have cat write the two files into that, at the same time as another 
program is reading the fifo and processing it. The receiving program 
only sees one fifo, containing the data of both files. The fifo only 
allows cat to write to it as long as the process on the other end is 
reading, so it doesn't take much space.

fp




More information about the ILUG mailing list