Skip to main content
Post Undeleted by Vitalie Ghelbert
Post Deleted by Vitalie Ghelbert
added 80 characters in body
Source Link

Use the tty command in each terminal to identify them:

$ tty
/dev/pts/0

$ tty
/dev/pts/1

Assuming these TTYs, to redirect the first's stdout to the second, run this in the first terminal:

exec 1>/dev/pts1pts/1

Note: Now every command output will show on pts/1

To restore itsdefault behavior stdout of pts/0:

exec 1>/dev/pts0pts/0

See this video for a demonstration.

Use the tty command in each terminal to identify them:

$ tty
/dev/pts/0

$ tty
/dev/pts/1

Assuming these TTYs, to redirect the first's stdout to the second, run this in the first terminal:

exec 1>/dev/pts1

To restore its stdout:

exec 1>/dev/pts0

See this video for a demonstration.

Use the tty command in each terminal to identify them:

$ tty
/dev/pts/0

$ tty
/dev/pts/1

Assuming these TTYs, to redirect the first's stdout to the second, run this in the first terminal:

exec 1>/dev/pts/1

Note: Now every command output will show on pts/1

To restore default behavior stdout of pts/0:

exec 1>/dev/pts/0

See this video for a demonstration.

deleted 284 characters in body
Source Link
Michael Mrozek
  • 95.7k
  • 40
  • 245
  • 236

Aloha!

Use the tty command in each terminal to identify them:

  1. Open two terminals;
  2. Identifying each terminal with tty command;
  3. Supposing they identified with /dev/pts/0 and /dev/pts/1;
  4. In terminal pts/0 redirecting stdout to pts/1 with exec command: exec 1>/dev/pts/1
  5. Now every command stdout output from pts/0 terminal is displaying in pts/1;
  6. Redirecting back stdout with commad: exec 1>/dev/pts/0
  7. Now pts/0 stdout working as before.
$ tty
/dev/pts/0

$ tty
/dev/pts/1

##[YouTuBee]:It's betterAssuming these TTYs, to see onceredirect the first's stdout to the second, than hear seven times Note: Click on image to open video on YouToBee
run this in the first terminal:

exec 1>/dev/pts1

To restore its stdout:

exec 1>/dev/pts0

See this video for a demonstration.

Aloha!

  1. Open two terminals;
  2. Identifying each terminal with tty command;
  3. Supposing they identified with /dev/pts/0 and /dev/pts/1;
  4. In terminal pts/0 redirecting stdout to pts/1 with exec command: exec 1>/dev/pts/1
  5. Now every command stdout output from pts/0 terminal is displaying in pts/1;
  6. Redirecting back stdout with commad: exec 1>/dev/pts/0
  7. Now pts/0 stdout working as before.

##[YouTuBee]:It's better to see once, than hear seven times Note: Click on image to open video on YouToBee

Use the tty command in each terminal to identify them:

$ tty
/dev/pts/0

$ tty
/dev/pts/1

Assuming these TTYs, to redirect the first's stdout to the second, run this in the first terminal:

exec 1>/dev/pts1

To restore its stdout:

exec 1>/dev/pts0

See this video for a demonstration.

Source Link

Aloha!

  1. Open two terminals;
  2. Identifying each terminal with tty command;
  3. Supposing they identified with /dev/pts/0 and /dev/pts/1;
  4. In terminal pts/0 redirecting stdout to pts/1 with exec command: exec 1>/dev/pts/1
  5. Now every command stdout output from pts/0 terminal is displaying in pts/1;
  6. Redirecting back stdout with commad: exec 1>/dev/pts/0
  7. Now pts/0 stdout working as before.

##[YouTuBee]:It's better to see once, than hear seven times Note: Click on image to open video on YouToBee