27

Let's say we do:

tail -f  /var/log/apache2/error.log

Then we see what we want to see, and then, we want to quit, so that we can navigate to other directories and so on... So, the question is:

How can we quit tail ?

I've tried to type: 'q', and 'exit', and 'quit', and 'kill', no luck.

Jorge Castro
  • 71,754
MEM
  • 11,065

2 Answers2

43

The answer to your query is to hit Ctrl + C together

  • :) I was used to Control-B Thanks. :) – MEM Apr 24 '11 at 16:20
  • 1
    In general pressing Ctrl-C sends the 'interrupt' signal, aka SIGINT, to whatever is running. It tells the application that that the user wants to interrupt whatever it is currently doing. Many applications will exit when the get that signal, as tail does, others may stop doing something but continue running. – bdsl Aug 25 '15 at 10:38
  • 2
    I'm looking for an alternative. If you run a multi-command line like start daemon; tail -F logfile; stop daemon (in bash or fish), pressing Ctrl+C aborts mission early (without running stop daemon as intended). – user2394284 Jul 20 '17 at 13:08
3

In Linux Mint 18 the answer actually is q to quit out of a tail view in terminal

  • life saver.. got inside by touch config.json and the prompt with "?" came up. So frustrating. – Max Jan 12 '17 at 19:53