[clue] "Tee" copy??

Mike Nolte obiwanmikenolte at gmail.com
Sat May 31 09:09:06 MDT 2014


It depends on the definition of "copy" and the use case.  Mostly, I've
only used tee for logging, but if you're trying to copy something to
multiple destinations, what don't you like about "cat sourcefile | tee
DEST1 DEST2"?  If it's just that it spits gibberish to stdout, it could
be redirected to /dev/null.  What no combination of cat/tee/redirection
will do is preserve chmod information, which is probably a problem.

On 5/30/2014 9:27 PM, foo7775 at comcast.net wrote:
> Hey, I think that most of us are familiar with the 'tee' command,
> which allows the user to "split" a single input into two output
> streams.  I was asked yesterday if there was a way to do the same
> thing with files that are being copied,and I had to admit that I had
> no idea, I'd never considered that before.
>
> I thought I'd take just a minute to ask the group if anyone knows of a
> way to copy an arbitrary "file (or group of files, some of which might
> be compiled binaries, etc.)" from a single source to two separate
> destinations simultaneously.  I'd *briefly* considered something like
>
>    "cat sourcefile | tee DEST1 DEST2"
>
> since within *NIX everything's a file, but then figured that compiled
> binaries *might* cause problems.
>
> Not a really big deal if it's not easily possible, but the question
> kind of intrigued me, & I figure I might learn something cool...  ;-)
>
> Thanks guys!
>
> T.
>
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20140531/ff2f925e/attachment.html 


More information about the clue mailing list