10

For example, I'm running tail -f someLogFile. My screen has gotten full to the point that only the last line is changing. I now want to clear the screen; but the usual Ctrl+L doesn't work, just shows me the output ^L.

15

Using Ctrl + L Won't work as input from keyboard is not accepted, but You can do this:

Toolbar options of Terminal -> Terminal -> Reset and clear

This will do the trick!

hope this helps!

2
  • Ah... I'm using guake at the moment which doesn't have a menu bar. But yes this would work on the default terminal.
    – Aditya M P
    Feb 4 '14 at 14:37
  • Then best option will be to redirect the output i.e. use $ command > output.txt This will write all the output in file output.txt Feb 4 '14 at 14:40
8

For Ubuntu (16.04) :

Go to Terminal > Preferences > Shortcuts (tab) > Under "Terminal Section" > set Shortcut key for "Reset" and "Reset and Clear" , It is disabled by default.

Hope this helps!

1

ctrl+l unfortunately doesn't work during tail.

There are a few things you could do. If you are using the default unity terminal, you can go to Terminal > Reset and clear.

If you are not using a graphic terminal or you're using a different terminal The best thing you could do is run the log into a text file using

tail -f /foo/bar > ~/output.txt

then you can view it using a text editor. That would let you scroll the file manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.