Equivalent of 'clear' command when using tail -f

10

2

I am using the tail -f command to follow an error log, and I often want to "clear" the terminal, much in the same way that the clear unix command moves everything above the top of the window. Is there something like this when using tail?

At the moment I just hit return a bunch of times which works okay, but gets rather annoying, especially when I have a tall window.

I am on mac os 10.6.8.

AndyPerlitch

Posted 2012-03-30T18:00:54.303

Reputation: 204

Can't you just go "View" > "Clear Scrollback" or press ⌘K? – micke – 2012-03-30T20:07:00.073

Answers

25

View > Clear Scrollback or press +K

micke

Posted 2012-03-30T18:00:54.303

Reputation: 3 001

And Alt+F8 (right click, Reset) for Cygwin – Xenos – 2019-09-14T16:56:55.593

2

There isn't. Tail is reading a file, not your input. You could get the source for tail and modify it to behave the way you want, but there's no built in way to do this.

Scott C Wilson

Posted 2012-03-30T18:00:54.303

Reputation: 2 210

You are right that there is not way tail can do this. – Hennes – 2014-11-08T21:27:24.503