Tailing multiple files with less

3

2

I want to have the best of both worlds with tail and less. Following multiple files, like tail can, but also having the scrollable buffer of less.

So, I tried:

tail -f mylog1 mylog2 | less +F

But this only gives me a blank screen until I interrupt. Doing "shift-F" again doesn't help.

How do I do this? It seems to me that following stdin shouldn't be that hard for less?

Markus

Posted 2010-02-25T16:27:00.847

Reputation:

Answers

1

Two options:

  • MultiTail MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses).
  • Use screen to create multiple windows; then run tail (or even better, less -F) in each of them

sleske

Posted 2010-02-25T16:27:00.847

Reputation: 19 887