[NTLUG:Discuss] Output to Multiple Files - Now More

Patrick R. Michaud pmichaud at pobox.com
Thu Apr 7 10:06:17 CDT 2005


On Thu, Apr 07, 2005 at 07:06:49AM -0700, David Wilson wrote:
> Ok the use of Tee did just what I wanted.  I am now
> only one more step away.
> 
> Considering I will be writing 20 - 60 gb of data to a
> Fat32 filesystem I need to pipe the dd output to Split
> to break it into pieces.
> 
> I can not seem to get the output after it is split to
> pipe into Tee.
> 
> Any suggestions?
> 
> This is what I am trying
> 
> dd if=/dev/sdb |split -b 640m | tee file1 > file2

Oops, split doesn't forward its input to standard output for
tee to be able to do anything with it.  

If you're wanting to have a complete copy of the file, along
with a split version, then you do something like:

  dd if=/dev/sdb | tee complete | split -b 640m 

which puts a full copy in "complete", and split copies into 'xaa',
'xab', 'xac', etc.

If you're wanting *two* split-up copies, have you looked into using
symlinks or hardlinks or something like that?  Either that or
just copy the split versions of the file when you're done.

(It's not entirely clear to me why you're using this particular
approach or the overall problem you're trying to solve; there
are probably better ways to solve it altogether.)

Pm


> --- David Wilson <drindles at yahoo.com> wrote:
> > My understanding is that Tee outputs to Standard out
> > (monitor) and a file but not to two files.  
> > 
> > 
> > --- Fred James <fredjame at fredjame.cnc.net> wrote:
> > > David Wilson wrote:
> > > 
> > > >I am looking for a little help in finding a tool
> > > that
> > > >will let me send the output of an script into to
> > > >simultaneous file locations.  For example,  I
> > will
> > > >read in the contents of a floppy diskette using
> > dd,
> > >  I
> > > >would like the out put to go to two different
> > > >locations at the same time.  At the present time,
> > 
> > > I
> > > >have to run the command twice, once for each
> > > location.
> > > > I also read in large hard drive volumes using dd
> > > so
> > > >simply making a copy of the dd image file is not
> > a
> > > >solution since it takes too much time.
> > > >
> > > >Any suggestions?
> > > >
> > > >Thanks
> > > >
> > > >
> > > >David
> > > >  
> > > >
> > > David Wilson
> > > Will "tee" work for you?
> > > Regards
> > > Fred James
> > > 
> > > -- 
> > > Compassion alone stands apart from the continuous
> > > traffic between good and evil proceeding within
> > us. 
> > > "Om Mani Padme Hum"
> > > 
> > > 
> > > _______________________________________________
> > > https://ntlug.org/mailman/listinfo/discuss
> > > 
> > 
> > 
> > 		
> > __________________________________ 
> > Yahoo! Messenger 
> > Show us what our next emoticon should look like.
> > Join the fun. 
> > http://www.advision.webevents.yahoo.com/emoticontest
> > 
> > _______________________________________________
> > https://ntlug.org/mailman/listinfo/discuss
> > 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Personals - Better first dates. More second dates. 
> http://personals.yahoo.com
> 
> 
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss




More information about the Discuss mailing list