Questions tagged [tail]

Tail is a command-line program that by default outputs the last ten lines to standard output; with other command switches, particular numbers of lines can be specified and files can be monitored in real time.

68 questions
90
votes
2 answers

tail: Reading an entire file, and then following

I would like a tail -f type of behavior that reads the entire file and then continues to follow it as it's written to. SOLUTION Based on the answer I accepted, this works: tail -f -n +1 {filename} Why it works: The -f option continues to "follow"…
Sonny
  • 1,245
27
votes
2 answers

Tail - how to quit tail and restore terminal window?

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…
MEM
  • 11,065
4
votes
2 answers

option like TAIL to keep track of WHOLE file

tail -f will update the file once new data is inserted , but if the whole file is being rewritten it will give an error . is there any other option to keep reloading the whole file ? Thank you
TeAmEr
  • 440
3
votes
2 answers

What package is tail included with?

What package is tail (the command-line tool to see the end lines of a file) included with in the latest stable version of Ubuntu, if I want to install or uninstall it (and does it come installed by default)? I already have it installed; I just don't…
2
votes
0 answers

how to trace running a file?

I want to run a script (something.tcl) with a program (NS2-Network simulator )in Ubuntu 12.04. In order to run that program I have to write the below command: NS something.tcl when I type that command I see something like this for example blah …
Mohammad Reza Rezwani
  • 10,286
  • 36
  • 92
  • 128
1
vote
2 answers

How to display from line 10 to line 23 in from passwd using tail?

How to display from line 10 to line 23 in from passwd using tail? I know that using tail -1/etc/passwd It will display last line from passwd So please help.
Ayman
  • 11
0
votes
1 answer

Ending a tail -f on log files

I have to kill the tail -f process after using it to tail log files. Is there a way to end the process within the tail -f display of the logfile?
Don
  • 293