Hacker News new | ask | show | jobs
by jetpks 4097 days ago
If you're using a modern terminal with scrollback, you already have the ability to pause, and scroll back.

    # tail -f busy.log
    < see something of interest >
    ctrl+s # Stops flow of output.
    pgup/pgdn for navigation # fn+up/dn for OS X users
    ctrl+q # Continues flow.
No need to reinvent the wheel, the functionality you want is probably built into the tools you're already using.
2 comments

This is not a replacement for searching for a specific string in `less` which highlights the matches, and eliminates the need for scanning the text manually which is harder and prone to missing information.
Correct, however the author is saying that there's no reason to ever use tail unless you're tailing multiple files, which is false. Most of the functionality you want is already built into your terminal emulator. If you want slower updates (`less` uses 1 second polling, vs `tail` [inotify]), and the ability to search, by all means, use `less`.
Hmm, someone should add inotify handling to `less`.
Most terminals also offer searching capability, which do not result in disk seeks on the remote host.
But it won't show me old parts of the log and I usually want this.