In computing, tee is a command in various command-line interpreters (shells) such as Unix shells, 4DOS/4NT and Windows PowerShell, which displays or pipes the output of a command and copies it into a file or a variable. It is primarily used in conjunction with pipes and filters.

learn more… | top users | synonyms

-1
votes
1answer
53 views

rewrite destination IP of TEEed traffic

Server 1 and Server 2 (Centos 7) both host the same application, which listens on UDP port 1514. Server 1 receives traffic on this port. The goal is for the application on Server 2 to receive a copy ...
0
votes
1answer
238 views

Bash: Output of a command is written only to screen and not to another file while using tee, what could be the reason?

In order to troubleshoot some ftp connection error, I've been instructed to write a bash script which will infinitely connect to a remote frp server and get one file from there. ftpuser="ftpuser" ...
2
votes
1answer
447 views

UDP Proxy with cloned packets

Having UDP messages sent from dynamic public IP periodically to public IP X:20000. Need a proxy that listens in IP X:20000, then forwards duplicate/clone packets to X:20001 and a different machine ...
5
votes
1answer
346 views

screen causes “tail -F | grep” to echo unmatched lines

This is Ubuntu (3.13.0-29-generic #53), trying to do a simple bash script to monitor a log file for matching lines. If I do the following, there is no output in the bash shell except for matches, ...
0
votes
1answer
78 views

Where does cron store the real-time stderr logs?

I've got a cron job configured to run a command like some-command 2>&1 >/dev/null | tee -a /tmp/some-command.STDERR.$(date +\%Y-\%m-\%d.\%H.\%M) I've also got a tmpreaper cron job that ...
1
vote
2answers
949 views

Execute command over SSH while logging live output

I'm trying to log the output of a remote ssh command. I'm current using ssh USER@IP | tee -a ~/random.log and then run the command I need to run on the remote server which then logs to random.log. ...
3
votes
1answer
883 views

iptables + TEE doesn't work correctly

On my server, I want to duplicate all the traffic to an other host. I use iptables with TEE module: iptables -t mangle -A PREROUTING -i eth0 -j TEE --gateway IP_SERVER2 I check the rule: iptables ...
0
votes
2answers
137 views

How to output a stdout both to a process and the shell screen

Do someone knows a way to send the stdout of a command both to another command and display it in the shell screen? Note: without using files. An example (in this case I use wc -l to make it simple ) ...
2
votes
2answers
2k views

Why is this tee losing stdout?

Simple script: #!/bin/bash remote_ssh_account="depesz@localhost" directory_to_tar=pgdata exec nice tar cf - "$directory_to_tar" | \ tee >( md5sum - | \ ssh ...