<div dir="auto"><div dir="auto"><div>While I don't have a definitive answer to the Ctrl-S history, I seem to recall it's about suspending output, originally to a physical line printer, (and a teletype before that), but don't quote me on that.</div><div dir="auto"><br></div><div dir="auto">I came across a discussion on Mastodon about other bash tricks and tips:</div><div dir="auto"><br></div><div><a href="https://infosec.exchange/@cR0w/116915966560002695" target="_blank" rel="noreferrer">https://infosec.exchange/@cR0w/116915966560002695</a></div><div dir="auto"><br></div><div dir="auto"><br></div><div data-smartmail="gmail_signature">--<br>finger painting on glass is an inexact art - apologies for any errors in this scra^Hibble<br><br>()/)/)() ..ASCII for Onno..</div></div><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 16 July 2026, 18:27 Juneidy Wibowo via plug, <<a href="mailto:plug@plug.org.au" target="_blank" rel="noreferrer">plug@plug.org.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:Arial,sans-serif;font-size:14px">G'day all,</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Sharing a revelation that I had today, that might sound obvious to long time linux users.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">I am by no means a linux newbie, but nevertheless, I am always learning something new about GNU/Linux.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">I am a primarily terminal user and I have always used terminal multiplexer like GNU-screen and tmux.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Occasionally, I would use the "copy mode" of the multiplexer to "freeze" the screen to copy a few stuff. And the string I want to copy can be a long JSON string that line wraps in my terminal.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Now if you use a mouse to highlight and copy this long string while in the multiplexer's "copy mode", the line wraps translates to a "new line" (\n) character.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">So occasionally, I would use Ctrl+S to maintain the line wrap of this long string to copy, then continue with Ctrl+Q when I am done.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Here's the part that I never noticed and surprised me today: bash actually "freezes" the process while in this mode provided if the process writes to <code>/dev/stdout</code>​.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">I did a few tests with some simple for-loop in bash:</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px"><code>$ for i in {1..20}; do date >> /tmp/foo.log; sleep 1; done # Does not freeze the process with ctrl+s</code><span></span></div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Whereas</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px"><code>$ for i in {1..20}; do date >> /tmp/foo.log; date; sleep 1; done # Freezes the process with ctrl+s</code>​<span></span></div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">I guess this only came as a surprise because I am so used to terminal multiplexer "copy mode" where the process continues to produce output while in this mode and you are fast-forwarded after you exited "copy mode".</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">I haven't really bothered to find out the history of this Ctrl+S but someone smarter than I am might shed some wisdom/history on this.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Regards,</div><div style="font-family:Arial,sans-serif;font-size:14px">Juneidy</div>
<div style="font-family:Arial,sans-serif;font-size:14px">
    <div>
        
            </div>
    
            <div>
        
            </div>
</div>
_______________________________________________<br>
PLUG discussion list: <a href="mailto:plug@plug.org.au" rel="noreferrer noreferrer" target="_blank">plug@plug.org.au</a><br>
<a href="https://lists.plug.org.au/mailman/listinfo/plug" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.plug.org.au/mailman/listinfo/plug</a><br>
Committee e-mail: <a href="mailto:committee@plug.org.au" rel="noreferrer noreferrer" target="_blank">committee@plug.org.au</a><br>
PLUG Membership: <a href="http://www.plug.org.au/membership" rel="noreferrer noreferrer noreferrer" target="_blank">http://www.plug.org.au/membership</a><br>
</blockquote></div>