I have a command that outputs thousands of lines. I actually need these lines in order to see the progress of the command. But I do not need to see more than the 10 most recent lines. How can I do that? I already tried using a pipe and tail . But it did not work. I just got the last ten lines after the original command finished: whatever command that has too much output | tail -f It is important that the console does not get cleared or something...
Originally asked by BrainStone on Stack Exchange (unix) (CC BY-SA 4.0).