Skip to main content
edited tags
Link
Hauke Laging
  • 94.8k
  • 21
  • 132
  • 185
edited title
Link
Braiam
  • 36.9k
  • 29
  • 114
  • 176

ssh: how How to terminate remotely called "tail -f" when connection is closed?

Tweeted twitter.com/#!/StackUnix/status/473127349202853888
Source Link
Dmitry Frank
  • 2.8k
  • 9
  • 29
  • 38

ssh: how to terminate remotely called "tail -f" when connection is closed

I just noticed that if I execute ssh user@remote_host tail -f /some/file , then tail -f /some/file keeps running on the remote_host even if ssh connection is closed!

So, after several connects and disconnects, number of running tail -f /some/file grows. How to actually terminate tail -f when ssh connection is closed?