[plug] Bash Ctrl+S
Kevin Shackleton
krshackleton at gmail.com
Fri Jul 17 07:47:19 AWST 2026
That's correct, not only printers but terminals like VT100, if you were
around in the days we had obsolescence-proof S100 computers like Vromemco. K
On Thu, 16 July 2026, 20:09 Onno Benschop via plug, <plug at plug.org.au>
wrote:
> 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.
>
> I came across a discussion on Mastodon about other bash tricks and tips:
>
> https://infosec.exchange/@cR0w/116915966560002695
>
>
> --
> finger painting on glass is an inexact art - apologies for any errors in
> this scra^Hibble
>
> ()/)/)() ..ASCII for Onno..
>
>
>
> On Thu, 16 July 2026, 18:27 Juneidy Wibowo via plug, <plug at plug.org.au>
> wrote:
>
>> G'day all,
>>
>> Sharing a revelation that I had today, that might sound obvious to long
>> time linux users.
>>
>> I am by no means a linux newbie, but nevertheless, I am always learning
>> something new about GNU/Linux.
>>
>> I am a primarily terminal user and I have always used terminal
>> multiplexer like GNU-screen and tmux.
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> 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 /dev/stdout.
>>
>> I did a few tests with some simple for-loop in bash:
>>
>> $ for i in {1..20}; do date >> /tmp/foo.log; sleep 1; done # Does not
>> freeze the process with ctrl+s
>>
>> Whereas
>>
>> $ for i in {1..20}; do date >> /tmp/foo.log; date; sleep 1; done #
>> Freezes the process with ctrl+s
>>
>> 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".
>>
>> 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.
>>
>> Regards,
>> Juneidy
>> _______________________________________________
>> PLUG discussion list: plug at plug.org.au
>> https://lists.plug.org.au/mailman/listinfo/plug
>> Committee e-mail: committee at plug.org.au
>> PLUG Membership: http://www.plug.org.au/membership
>>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> https://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.plug.org.au/pipermail/plug/attachments/20260717/fb64210c/attachment.htm>
More information about the plug
mailing list