On 30/09/2025 19:39, Alipour Alipour wrote:
Hi,

Can tee handle being pointed to the same file multiple times under
different mount points?

For example?

cat bigfile | tee /foo/1 /bar/1 >/baz/1

And /foor, /bar and /baz happen to be the exact same filesystem,
simultaneously mounted multiple times under different mount points.

Will tee handle it safely and correctly?

Well tee doesn't do anything special here
(and couldn't if the file is under separate mount points)

Each file descriptor it opens (including stdout) will have independent offsets.
The _same data_ is written to completion on each file descriptor.
So theoretically there will be redundant writes, but the end result should be 
OK.
(This doesn't work of course with tee -a).

cheers,
Padraig

Reply via email to