I have say two terminal sessions pts/10 and pts/11. In pts/10, I want to capture the stdout of any process that takes place in pts/11 and redirect it to a file. I know that the output can be redirected from pts/11 itself (using >/dev/pts/10), but I don't want to do that. As I said, I want to 'capture' whatever is being printed in the stdout by pts/11. Is there some utility to do that?
Asked
Active
Viewed 1,586 times
1 Answers
0
I don't think, you can do that, UNLESS, you start something on pts/11 (Either output redirect, or tee /dev/pts/10 or script
command.)
If it had been possible, it could essentially be used in hacking/snooping.
Imagine getting passwords in case of wget --user=someuser --password=plain_text_password
command run on the terminal pts/11 & captured by pts/10. (EDIT: Ok, that was stdin, not stdout.) But there may be serious security issue if it had been possible.

anishsane
- 20,270
- 5
- 40
- 73
-
2How about, if this is possible only if both the pts are controlled by the same user? Then it is not a security issue! – Nehal J Wani Dec 06 '12 at 17:25