[NTLUG:Discuss] Copying a file to TWO destinations as the same time..
Stuart Yarus
syarus at kvsystems.org
Sun Jan 29 11:22:28 CST 2006
That's three statements on one line :-) But, if you use the -p option
(and the destination has appropriate permissions), cp gives more
original information on the copied file - and avoids the piping.
The original question mentioned tee.
Stuart Yarus
Terry wrote:
> On 1/29/06, Stuart Yarus <syarus at kvsystems.org> wrote:
>
>>If you really want to use tee, try:
>>
>> cat file | tee location1 | tee location2 | tee location3
>>
>>This method uses the original file just once. The method certainly
>>isn't recommended for many or for large files, due to the use and
>>duplication of stdout (standard output).
>>
>>Your backup method should depend on the nature of the backup.
>>
>>Stuart Yarus
>>
>
>
> And what about?:
>
> cp file location1 ; cp file location2 ; cp file location 3
>
> same end result, right?
> (Or maybe I'm missing something here?)
>
>
>
>>Richard Geoffrion wrote:
>>
>>>Fred James wrote:
>>>
>>>
>>>>Richard Geoffrion wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Does anyone know of a way..or possible way to copy a file to multiple
>>>>>locations at the same time? I know that TEE can do something.... <snip>
>>>>>
>>>>Richard Geoffrion
>>>>Tee should do it - it takes from stdin and writes to stdout plus a
>>>>file (or files), and stdout can be redirected. Is that what you
>>>>wanted to do, or did I get that wrong?
>>>><snip>
>>>>
>>>>
>>>Well, My intentions with this is to figure out someway to cut down on
>>>dirvish backup times. I run dirvish TWICE each night.. Once for the
>>>inhouse drive and once for the offsite drive. If I could 'tee' the
>>>files to two physical drives at once..I think it would GREATLY speed
>>>things up. The only catch that I JUST KNOW THOUGHT OF... If you are
>>>rsyncing...the information that would go between the two different drive
>>>sets most likely will be different.
>>>
>>>I need something like an 'rteenc' or 'teesync' !! :) I'll have to
>>>think on this some more..
>>>
>>
>>
>>
>>_______________________________________________
>>https://ntlug.org/mailman/listinfo/discuss
>>
>
>
>
> --
> <><
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list