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

2
votes
2answers
24 views

tail -f grep for one paragraph (X lines) filter by selected PID

I have a flowing log file that separated by enter each lines its makes problem to just tail it with grep 'PID' it just show 1 line: This is the Sample: [7/12/16 17:00:12:206 WIB] 0000013d ht....
1
vote
1answer
131 views

User limit of inotify watches reached on Ubuntu 16.04

I just installed Ubuntu 16.04 and I get this warning when I start SmartGit: IOException: User limit of inotify watches reached Moreover I get this warning launching tail -f: tail: inotify ...
1
vote
3answers
82 views

`tail` and append in oneliner

How could I tail and append a text in a file, in one line, in Bash? My failed attempt would be tail file.txt > file.txt && date >> file.txt
19
votes
4answers
18k 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 ...
5
votes
4answers
14k 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 ...
0
votes
0answers
31 views

Zombie being made from 'tail -f' cron job that grep's and launches shell script

I realize that a single zombie process like this is nothing to worry about, I just want a more professional outcome (no zombie) from my code. My cron job calling a shell script produces a single ...
3
votes
1answer
86 views

Have bash script run against a live file - Is it possible?

I have a script I've written and (finally) have it working like I want it to, as long as I run it against a static file. Is there a way to tail a live file and have the script perform its actions ...
2
votes
1answer
34 views

Is there a maximum amount of time that tail -f can reliably run?

I have noticed that when I tail -f various log files (specifically Apache access/error logs), that it ceases to actively scroll output after a certain of number of hours. I am uncertain if this is a ...
2
votes
2answers
110 views

Command substitution using grep'ed and sed'ed tail -f output as argument source into 'at' command

This is for a home surveillance system, headless server running Ubuntu 15.04, and I want its security to be exemplary. I envision a command line solution (with optional script, if absolutely necessary)...
1
vote
2answers
263 views

Why redirection to a while loop doesn't print the messages?

Here is a shell code used to track changes in a file and output the content to the terminal: while read LINE do echo $LINE done < `tail -f /var/log/messages` It doesn't work, why?
1
vote
2answers
390 views

How do you get those nifty transparent log displays?

So I've seen plenty of displays of transparent logs or running logs or htop instances on what appear to be fixed areas of a desktop. I think this is something like root-tail but I can't get root-tail ...
1
vote
3answers
707 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 ...
3
votes
1answer
2k views

Why won't `tail -f` follow my syslog when running live?

I want to monitor /var/log/syslog for any changes in realtime (or within-a-few-seconds-of-time), but tail -f won't update with any new changes. I'm running Ubuntu-based Linux Mint 17 XFCE live now, ...
2
votes
0answers
181 views

solaris tail on ubuntu

Is there a way to make linux tail understand the Solaris tail syntax (precisely like tail +2)? The short story is that I have some update scripts written for Solaris on the repo and I cannot modify ...
8
votes
2answers
1k 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 ...
4
votes
2answers
4k 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
486 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 ...
2
votes
2answers
2k 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
1answer
104 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 ...
21
votes
5answers
2k 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
160 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
27 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
856 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" ...
4
votes
3answers
16k 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: ...
1
vote
2answers
345 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
618 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
5k 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 ...
6
votes
1answer
361 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
393 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?
9
votes
1answer
49k 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
127 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}' ...
13
votes
4answers
2k 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 ...