24

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.

37

The answer to your query is Ctrl-C

| improve this answer | |
  • :) 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

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

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.