Re:Unix tricks
by carlesfe on Thursday March 07, 2013 @02:16PM
(#5339534)
But the remote host can limit your ServerAliveInterval, however most hosts don't close your session if there is something running. On our clusters this is the only working solution, and I tried both, trust me.
[ Parent
| on HN ]
If that's an issue (I've never met a server like that, not to mention one like that and I couldn't change the setting) then wouldn't you rather use this?
while [ true ]; do sleep 1000; done
Just using: sleep 1000; exit
means you can't make new connections after 17 minutes.Yes, in fact I use the first one (while true; sleep; ls) but I thought the second is more succint. Anyone interested can make a loop. Please notice that most of the snippets aren't meant to be copied & pasted, but rather analyzed and understood by the user.