Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I frequently use tail to monitor errors:

tail -f /var/log/apache2/error_log

I can use the shortcut cmd+K to clear the screen (OSX), but I've grown accustomed to using ^L in other linuxy situations. When I attempt to use it while tail is monitoring a file, I see output ^L instead:

[Fri Sep 30 12:08:58 2011] [notice] Apache/2.2.19 (Unix) PHP/5.3.6 with Suhosin-Patch DAV/2 mod_wsgi/3.3 Python/2.7.1 configured -- resuming normal operations

Is there a way to get ^L to work the way i'm expecting it to in this situation?

share|improve this question
up vote 1 down vote accepted

Go to System Preferences » Keyboard » Keyboard Shortcuts » Application Shortcuts and assign ^L as keyboard shortcut for the Clear Scrollback menu item in

enter image description here

^L (Form Feed) is different from Clear Scrollback though if you have Terminal's scroll back enabled — the former keeps all output and just scrolls down, printing a new prompt.

share|improve this answer
Ah I see. this works, though it changes the behavior of ^L in other situations. Is it not possible to form feed when tail is monitoring a file (since the prompt is not available, maybe)? – lettertwo Sep 30 '11 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .