Skip to main content
The 2024 Developer Survey results are live! See the results
improved answer
Source Link
golimar
  • 1.7k
  • 1
  • 23
  • 37

If you just want to watch the log lines, and don't need the data afterwards, why not:

ssh host1 tail -f file & ssh host2 tail -f file &

To accomplish what you say in the comment, if you have the pee command (moreutils):

pee 'ssh host1 tail -f file' 'ssh host2 tail -f file' < /dev/null

If you just want to watch the log lines, and don't need the data afterwards, why not:

ssh host1 tail -f file & ssh host2 tail -f file &

If you just want to watch the log lines, and don't need the data afterwards, why not:

ssh host1 tail -f file & ssh host2 tail -f file &

To accomplish what you say in the comment, if you have the pee command (moreutils):

pee 'ssh host1 tail -f file' 'ssh host2 tail -f file' < /dev/null
Source Link
golimar
  • 1.7k
  • 1
  • 23
  • 37

If you just want to watch the log lines, and don't need the data afterwards, why not:

ssh host1 tail -f file & ssh host2 tail -f file &