Search

Send output from one terminal to another

If you are running a program in one terminal and want to view its output in another, here is a simple way to do it.

Open the the terminal in which you want to view the output
Run the command "tty"
The output should be some thing like    "/dev/pts/<Number>"   Note this down

Now open the terminal in which you want to execute the program and execute it, redirecting the output to the path that you got as the output to the "tty" command

for eg :

./test > /dev/pts/3 

The output will appear in the other terminal instead of the one in which you are executing the program.


Follow by Email