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.

learn more… | top users | synonyms

7
votes
2answers
659 views

Ending tail -f after print n lines

I have the following. A Java process writing logs on file A shell script starting the Java process. I need to read the log file after start Java process to check correct starting. I have try with ...
0
votes
2answers
62 views

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} ...
0
votes
0answers
31 views

How would you tail a file then pass the data to a socket?

I don't want to re-invent the wheel. I need a program or series of commands to tail a log file, then send the lines to a socket on another machine. It's for centralized log monitoring. Something that ...
0
votes
1answer
38 views

KDE, how to have “tail -f” constantly on a dedicated panel?

Plasma has this nice plasmoid called File Watcher. At work I have 2 monitors. I would like to put this plasmoid on an empty panel on the second monitor. So that tail -f /var/log/apache2/error.log ...
4
votes
2answers
1k views

'tail' command not getting only the new lines

I'm using the command: tail -f -n 0 file.txt But it keeps repeating itself. What I'm doing is the following: Create the file in the first terminal: touch file.txt Start the tail in the second ...
2
votes
0answers
222 views

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 ...
21
votes
5answers
1k views

How to view multiple files in single terminal?

Sometimes I may need to access multiple log files for troubleshooting , but I don't want to open them in different terminals. What I want is to open them in same terminal. Is there any way I can ...
0
votes
4answers
86 views

How to tail a log file when removing lines (not appending) of the file?

I want to know how to tail a log file when lines in the files are updating(appending and removing)?
0
votes
1answer
23 views

Tailing only updated line of file

I want to tail only the updated line of the file not entire content tail -F /path to file displays all the line from the file. I need to display only the new lines added to the file can anyone help ...
0
votes
2answers
78 views

tail output of program

How do you use tail to get the last line outputted by a program. I've tried the following so far: echo `cmd` >> stdin && tail -1 stdin For instance: henry@henry-pc:~$ echo "abc\n123" ...
2
votes
3answers
5k views

What does the 'tail' command do?

I'm new to Ubuntu. I previously ran a tail -f /var/logs/syslog and get the following displayed results: kernel: [ 2609.699995] [drm:gen6_sanitize_pm] *ERROR* Power management discrepancy: ...
4
votes
3answers
6k views

tail: inotify cannot be used, reverting to polling: Too many open files

When I try to tail -f catalina.out, I get the error: tail: inotify cannot be used, reverting to polling: Too many open files I tried the answer in this post: Too many open files - how to find the ...
1
vote
2answers
120 views

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.
4
votes
2answers
453 views

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
5
votes
3answers
2k views

Paginate with tail -f command

I am trying to tail file with pagination: tail -f foo.txt | more This works fine until file gets, lets say, 200 lines injected, when this happens nature of tail command is to go to end of file, at ...
0
votes
2answers
370 views

tail stops displaying in case of a log rotation

I have to tail the log of a server (servicemix) and the log rotation is enabled. As soon as the rotation happens, tail stops displaying. I did some investigations and it is a bug in Debian : Debian ...
6
votes
1answer
236 views

Highlighting with grep doesn't work in Xterm

I've got a problem with Xterm. When I use the command tail -F example.log | grep -a -i -e 'examplestring' in Xterm the "grepped" strings aren't highlighted in red like they would be in the normal ...
2
votes
1answer
272 views

How to make tail -f show time when line was appended?

I'd like to know the time when line was appended when file is being tail -f'ed. Is it possible to configure tail to do something like that?
5
votes
1answer
19k views

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 ...
1
vote
2answers
113 views

issues to inspect a long text file

If I run sudo pico /var/log/lighttpd/website/error.log I get a very long file, and I cannot see last lines. If I run: sudo tail -f /var/log/lighttpd/website/error.log | awk '{print $1 "--" $2}' ...
10
votes
4answers
7k views

GUI for watching logs (tail and grep)

Could you recommend a GUI application with powerful log watching capabilities? Generally it would work as tail -f in GUI, but on top of that following features would be very useful: filtering out ...
13
votes
4answers
1k views

Tailing two log files

I have a web application that outputs to a number of log files with performance information. One log file outputs code execution times and another outputs SQL timings. I have no control over the ...