Questions tagged [tail]

Output the last part of files.

Output the last part of files, print the last part (10 lines by default) of each FILE; tail reads from standard input if no files are given or when given a FILE of `-'.

Manpage

96 questions
8
votes
2 answers

Use local tools to monitor remote logs

I don't have root access on my hosted web server, but I would like to use tools like MultiTail to monitor log files that are generated on my web host. Is there a way I can pipe the log output on my remote host ( I have ssh access ), to my locally…
Ian
  • 1,498
  • 4
  • 26
  • 32
8
votes
2 answers

Tail server logs into XMPP?

So I have two files, and if a new line appears on either of these files, I'd like to receive an IM (preferably jabber or gTalk) containing the contents of that line. Do you guys have any suggestions for a Linux daemon or something that could do…
icco
  • 193
  • 8
7
votes
1 answer

screen causes "tail -F | grep" to echo unmatched lines

This is Ubuntu (3.13.0-29-generic #53), trying to do a simple bash script to monitor a log file for matching lines. If I do the following, there is no output in the bash shell except for matches, which is expected: tail -F server.log | grep…
Dale Mahalko
  • 755
  • 1
  • 6
  • 17
7
votes
1 answer

How to get "tail -f" working on a file located on a Windows share

I'm using a Mac and I have mounted a Windows network disk in my file system using "Connect to Server" in the Finder. In the terminal when i do tail -f on a log file located on said network disk, tail is not updating the display when new lines are…
6
votes
0 answers

Log file rotation and "tail -f"

I use log4j to create rolling log files from my program. It writes to a log file until it reaches 256mb, and then it renames all the log files and creates a new log file and continues logging. It is very useful for me to monitor these log files…
DivideByHero
  • 371
  • 1
  • 3
  • 8
6
votes
5 answers

tail all log files in a directory | exclude zipped files

Im trying to find the right command to tail a bunch of log files whilst excluding the zipped files in a set directory. The log files are being zipped as they become oversized. At the moment Im using: tail -f /var/logs/myLog* Which works fine, but…
JackalopeZero
  • 201
  • 2
  • 8
6
votes
3 answers

tail -f : `tail: logfile.log: file truncated`

I was watching a log file (logfile.log) with tail -f, and after a few minutes, the following message was written to the file: tail: logfile.log: file truncated I've never seen that before and I'm wonder why it happened, and how I can prevent it.…
bricker
  • 167
  • 1
  • 1
  • 7
5
votes
3 answers

Tail a file from ssh and mirror to a local file

To tail a file over ssh, I can use ssh -t remotebox "tail -f /var/log/remote.log" However, it is possible to sync the tail with a local file? So a file automatically mirror the update of the tail command?
Howard
  • 2,135
  • 13
  • 48
  • 72
5
votes
3 answers

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

tail: inotify cannot be used, reverting to polling: Too many open files I'm running apache and tomcat servers on Ubuntu (AWS ec2). Whenever I try to tail the catalina.out of tomcat I get too many open files. However I am able to view it using…
user23577
  • 71
  • 1
  • 1
  • 6
5
votes
5 answers

Can I tail an http resource?

Is there a way to tail a resource such as http://someserver.com/logs/server.log ? This is what I would do for a local file. tail -F /var/logs/somefile.log I would like something similar to that for a file accessed through the http protocol
Rythmic
  • 151
  • 1
  • 4
5
votes
2 answers

tail -f without the tail?

Is there a command in Solaris to read a file, and when it gets to the end to stream the way tail does? I need to read the file from the start, and it is a binary file. Information on Solaris and Linux would be appreciated.
700 Software
  • 2,233
  • 10
  • 49
  • 77
5
votes
3 answers

Can putty beep when tailing a log file?

I have a putty session tailing a log. I either keep flipping to it to see in anything has come up or I forget to check it at all. Can putty or tail be made to "beep" if anything scrolls into the window?
eflat
  • 173
  • 1
  • 5
4
votes
6 answers

"watching" a log on FreeBSD vs Linux

On Linux systems I can watch -n1 tail /var/log/whatever.log or watch -n1 grep somestuff /var/log/whatever.log To show updates to a log every 1 seconds. On FreeBSD however, the watch command does something else entirely. Who knows a good FreeBSD…
Cory J
  • 1,568
  • 5
  • 19
  • 28
4
votes
3 answers

Monitor multiple Linux log files in real time

I'm debugging a Linux application that allows remote jobs to be submitted, logging the output from each job in a new file. The log file paths conform to: /joblogs/job_*/JOB.LOG where the wild card represents the unique job number. I want to be…
gareth_bowles
  • 9,127
  • 9
  • 34
  • 42
3
votes
2 answers

Countinuous processing of tail -f output

I have a file where numbers are continuously appended: 1 2 3 4 I want to calculate their mean, also continuously, i.e.: 1 1.5 2 2,5 I don't want to check file periodically, I want to it in the manner tail -f work - as soon as a line is appended, I…
Stas
  • 157
  • 1
  • 8