Questions tagged [tee]

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 views

How can I gathering Network Traffic on AWS?

I am building packet mirroring using the Linux type's iptables tee module. In the case of instances(EC2), we confirmed that promiscuous mode can be set on AWS console configuration. than, I wonder if ...
0
votes
3answers
45 views

tee and assigning to variable?

I need to see output on the screen and at the same time grep the output and send grep result to variable. I think it can be done with tee but I can't figure out how exactly. I tried mycommand | tee ...
1
vote
1answer
30 views

logger and tee running in background?

Sometimes I notice the server is running slowly and at those times a ps -e shows that logger and tee are running but I can't think of why. Is this a known issue? Why would these need to run without ...
0
votes
1answer
60 views

Trying to send output to log file with tee using systemd but the log file isn't being created?

I want to run a node application via systemd and have its output go to both stdout and a log file. The node app is in the folder named www/www.appname.com and I want to have the log file in www/log....
0
votes
1answer
41 views

Can't empty log files

The servers at my work have a script made by me that every midnight copies log files to a folder, copies this folder to Amazon S3 and zeroes the original files. However, I saw that the original files ...
1
vote
1answer
1k views

Debugging rsync over SSH in verbose mode using tee to redirect stdout to log file

I have been having issues with various rsync operations over SSH, on a particular machine on our network, failing and giving errors like: rsync: connection unexpectedly closed (45482 bytes received ...
2
votes
1answer
153 views

Tee command is reducing the lines?

I have the code like this : 54 08 * * * /usr/local/bin/curator --dry-run --config /home/itadmin/.curator/curator.yml /home/itadmin/.curator/daily.yml 2>&1 | /usr/bin/tee -a /home/itadmin/....
1
vote
1answer
78 views

How do I pipe stdout and std error to a file and back to stdout on Windows?

On Windows when running a batch script I want to record the output of I run: myprogram.bat 1> mylog.log 2>&1 Which is great - but I have to run a separate tail process to read the output ...
0
votes
2answers
835 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
840 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
2k 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 ...
6
votes
1answer
653 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
376 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 ...
2
votes
2answers
3k 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
2k 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
222 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 ) ...
6
votes
2answers
5k 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 "$remote_ssh_account"...