from Hacker News

How to stop less from waiting for more data?

by kuba-orlik on 6/5/24, 6:24 PM with 1 comments

  • by kuba-orlik on 6/5/24, 6:24 PM

    Ok so here's a linux question that's been bugging me for years.

    I sometimes `less` to display/paginate a streaming stdout from another program. When I press `END` key on the keyboard, it brings me to the bottom of the stream, the latest data it has.

    Then it says "Waiting for data... (^X or interrupt to abort)"

    I want it to stop waiting for data and let me scroll up as it usually does when it's not waiting for data.

    I've tried pressing Control+X and Control+C, but it just closes less immediately instead of just interrupting the wait for new data.

    What do I press to make it stop waiting for data, not just close itself?

    This would particularly useful for browsing `journalctl` output