<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, May 5, 2015 at 1:23 PM, René J.V. <span dir="ltr">&lt;<a href="mailto:rjvbertin@gmail.com" target="_blank">rjvbertin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tuesday May 05 2015 19:58:44 Clemens Lang wrote:<br></span><span class="">&gt;That sounds like a perfect use case for screen or tmux.<br>
<br>
</span>I might check out tmux, but screen gets in my way by trying to be too clever. The easiest would be to redirect all output (&quot;&gt;&amp;&quot;) to file and then use tail -f until I decide to disconnect. Or maybe it&#39;ll be enough to pipe all output to cat, or otherwise an application that redirects it output elsewhere if stdout/stderr are closed (I think I must have something like that lying around). More often than not all that interests me when reconnecting is if the port command completed successfully, because if not there are logs already.</blockquote><div><br></div><div>Here&#39;s the (bash) you&#39;re looking for:</div><div><br></div><div>nohup [your command here] &amp;&gt; outputs.log &lt; /dev/null &amp; <br></div><div><br></div><div>You can happily tail -f outputs.log, or close the ssh session, or have the connection drop, without &quot;hanging up&quot; on the command. Starts in the background so you don&#39;t even have to do that. Obviously of no use for interactive tools (stdin redirected from /dev/null.)</div><div><br></div><div>You could even create a bash function that wraps all this (nohup invocation &amp; log tail-ing) for you.</div><div><br></div><div> - Eric</div><div><br></div></div></div></div>