On 09Sep2009 19:31, Gordon Messmer <yinyang@xxxxxxxxx> wrote: | On 09/08/2009 09:16 AM, devi wrote: | > I executed a command like | >echo "service httpd status"> /dev/pts/2 , where /dev/pts/2, is the | >virtual machine's terminal from the other terminal. The command | >"service httpd status" is executing in the virtual machine's terminal. | | I think you're mistaken. If you redirect output to another terminal | in the method that you describe, you will cause that text to be | displayed as output on that terminal. It does not become input to | the shell (or other program) running there, and will not be | executed. Indeed. But if he finds the _master_ side of the pty he can write to that, and it will be as though typed! | >What I want is to get the output of the command "service httpd status", | >executed in virtual machine into the terminal, | >where echo "service httpd status"> /dev/pts/2 command was executed | >i.e to the other terminal. I have tried different options, but no use. | | The command line: | | service httpd status > /dev/pts/2 2>&1 | | ...will display the output of the command on the second pty. | | >Can we use "openvm" command to achieve this requirement? | | I think you mean openvt. As far as I know, it won't do what you | want. I believe that it only works on VTs (/dev/ttyN), and only on | ones that are currently unattached. | | It's not clear what you want to do, but maybe the "screen" | application would be of interest to you. Also maybe "expect". It would help if devi clarified what he wanted a little more. In particular, what does: where /dev/pts/2, is the virtual machine's terminal from the other terminal. The command "service httpd status" is executing in the virtual machine's terminal. mean? There's a VM of some kind running? Cheers, -- Cameron Simpson <cs@xxxxxxxxxx> DoD#743 -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines