Welcome to novaBBS (click a section below)
|mail  files  register  newsreader  login|
|bash tac in freebsd||Retro Guy|
|Re: None||Retro Guy|
While working on displaying last user in a thread, I found that bash tac worked well and is much faster that cat as I want to get the latest files first and they're at the end of the overview.
Seems freebsd doesn't have tac, so I used cat on freebsd. Then I tried tail -r on freebsd and it works great, but it doesn't work on Linux (invalid option 'r').
So I'm back to using a different command for each os, but at least I can use tail -r on freebsd now.
I'll eventually get this into pure php, but right now this is the fastest way to gather the info and render the pages. Reading the file in reverse in php is much slower, so still looking into better ways to do this.
Posted on: novaBBS
Don't know about freebsd but dragonfly has implemented tac recently. It effectively is tail -rq
Posted on def2
On Tue, 15 Sep 2020 23:20:59 -0700
Anonymous <firstname.lastname@example.org> wrote:
> Don't know about freebsd but dragonfly has implemented tac recently.
> It effectively is tail -rq
Strange, I can't get tail -r to work on Debian. (invalid option -- 'r')
Of course tail -rq gives the same result.