Output the last part of files.

learn more… | top users | synonyms

0
votes
2answers
42 views

Tail, grep and count the instances found in one command?

I am tailing a files output and grepping for lines with certain data. I don't want to output the data to the screen but instead count the number of instances it found and send that to the screen. The ...
0
votes
3answers
42 views

How to make a cron script for cleaning up a log file? [closed]

I don't usually do this kind of stuff, so I just have to ask. How do I make a script which checks a log file, lets say it's named log.txt, grabs everything but the first 100 000 lines from it to a new ...
1
vote
2answers
633 views

tail -f not following log file in Docker container

I am seeing some strange behavior running the tail -f command inside a Docker container in CoreOS. There are a number of variables I can think of that may be contributing to the problem but I am not ...
24
votes
6answers
9k views

Colorize Monitoring of Logs

I sometimes monitor apache and php error logs using tail under FreeBSD. Is there any way to get colorized output, either using tail or some other command line app? Alternatively, what is your ...
1
vote
3answers
1k views

Capture piped multiline grep output into a variable

I'm using Zabbix's zabbix_sender.sh script to push exception stack traces to my remote Zabbix monitoring server. zabbix_sender.sh requires a key and a value for any data that it sends. It can read ...
6
votes
7answers
7k views

Colour tail of Apache logs

Monitoring apache logs with tail –f tends gets very frustrating for the eyes after a while. Are there any tool/options to colorize the log outputs? Maybe signal FATAL with red, etc...
2
votes
2answers
46 views

Script to email if grep result is null

its been a long time and I cant seem to remember how to do this. I am trying to grep a logfile for a word or words and email if it does not exist in the last fifteen minutes ( I will be setting a cron ...
4
votes
2answers
2k views

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 ...
30
votes
8answers
74k views

How to display certain lines from a text file in Linux?

I guess everyone knows the useful Linux cmd line utilities head and tail. Head allows you to print the first X lines of a file, tail does the same but prints the end of the file. What is a good ...
2
votes
3answers
143 views

issues to inspect a long text file in unix

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}' ...
4
votes
3answers
2k views

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

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 ...
0
votes
2answers
521 views

How to TAIL & EGREP for a specified time range in a BASH script

The subject mostly says it all. I am in charge of a few web servers running Ubuntu 12.04 running Apache2 & I would like to setup APC. Now I understand APC can hit segmentation fault issues when ...
3
votes
3answers
623 views

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: ...
0
votes
2answers
64 views

Tail grep what tools are for it

I would like to run the following command: tail -f /var/log/syslog | grep -ri 00:16:CB:1E:AF:CA In Linux but it does not working. How would you interactively grep certain text from log files?
-2
votes
1answer
36 views

Omit certain lines from tail -f [closed]

I like tail -f but I like to omit lines that have a certain string in them. Is this possible? I have seen example to include certain string but not how to omit.
5
votes
1answer
328 views

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, ...
0
votes
1answer
39 views

unknown client in my error.log

I have recently reinstalled my VPS OS and at present do not have any websites in my public_folder. In order to investigate a dovecot error which of course is not my question here, I issued tail -n 20 ...
0
votes
3answers
1k views

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 ...
0
votes
3answers
68 views

tail -f AND allow text input

I want to create a script that allows some interactivity by tail -f logfile from myService allows text to be entered and sent to myService What I could not solve yet is this two functions working ...
20
votes
10answers
11k views

Tail multiple remote files

Is there a way to remote tail 2 files? I have two servers(a and b) behind a load balancer and I would like to do something like this if possible: tail -f admin@serverA:~/mylogs/log ...
0
votes
0answers
127 views

Automatically reconnect ssh session for tailing remote file

I need a solution that basically tails a log file from a remote box... Works on Mac Restores itself whenever I have internet. (I frequently close and open the lid of my macbook) It could be a ...
2
votes
1answer
166 views

Any way that I can feed tshark a live capture written to a file without reading from the start?

I'm capturing traffic from a microtik router to my linux server and writing to a big file. I'm searching for a way to feed from the current file end forward since it is a several GB file and I can't ...
7
votes
4answers
276 views

Adding tail behaviour where enter adds blank lines to less

I love less, which I can use to follow logs with the +F flag (or the ShiftF hotkey), search forwards and backwards, and generally move freely through the document. But there is one thing missing in ...
0
votes
1answer
230 views

tail command not updating output for debug files

I know that tail -f /var/log/messages will be keep updating on screen as the contents of file gets updated. But when I tried the same thing with a debug file system's file it is not working , any ...
1
vote
3answers
690 views

tail-pipe-awk script, fine on Centos but weird on Ubuntu

I wrote a script on CentOS and now I'm trying to run it on Ubuntu and it is behaving unexpectedly. Here's something like the script, which I run under bash: sudo tail -F ...
1
vote
1answer
2k views

PHP Script To Monitor Apache Access Log Files using TAIL [closed]

I wrote a PHP script to live monitor the apache access_log file. I am using the following commands; $path_to_tail = '/usr/bin/tail'; $path_to_access_file = '/var/log/httpd/access_log'; ...
5
votes
3answers
2k views

How to watch for count of new lines in tail

I want to do something like this: watch tail -f | wc -l #=> 43 #=> 56 #=> 61 #=> 44 #=> ... It counts new lines of tail each second / Linux, CentOs To be more clear. I have got ...
1
vote
4answers
733 views

Tail -f on new files

Is there a way to do something like this: tail -f logs/ and make the stdout to be updated on every line added to each file already present in logs/ and to every file that will be created in logs/ ...
15
votes
2answers
880 views

Bash Prompt Below Output - Background Log Tail

I used to work for a company who had a customised shell for management of one of their products that was running on Linux and I'm looking to replicate a key feature of this shell. All the work was ...
0
votes
3answers
559 views

tool to analyse/grep log files [closed]

Is there any web based GUIs to analyse or in realtime filter/grep log files from apache? log files that are access logs or error logs or postfix logs etc. Edit: I don't mean traffic analysis. Much ...
1
vote
1answer
498 views

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 ...
2
votes
0answers
226 views

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 ...
2
votes
3answers
100 views

Detect file update from modification time

Is there a way to see how often a file is being updated? I mean I need to see if the modification time of a file is updated in a dynamic way (same as tail shows if the file is updated in a dynamic ...
4
votes
3answers
1k views

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

Grabbing the directory path in a message like “You have new mail in /var/spool/mail/root”

So I often get messages such as You have new mail in /var/spool/mail/root and end up typing/copy-pasting out: tail /var/spool/mail/root, which is a bit cumbersome. Is there a simple command that ...
0
votes
2answers
339 views

How to combine a real-time clock with tail -F

I always run tail -F to keep an eye on a log in a terminal window. The log has a UTC date at the beginning of each entry: [08-Jan-2013 16:24:22] Yo! When I glance at my log window I need to know ...
1
vote
4answers
3k views

Linux: Can I monitor all http connections to my site live? like tail -f /file/log.log only for http connections?

I want to monitor whether or not people are accessing my site live. I want to see the http connections made to my site in terminal/ssh. Something like a tail -f /file/log.log function but I believe ...
2
votes
4answers
2k views

`tail -f` sometimes stops updating - and the file hasn't moved

I have noticed recently that sometimes tail -f <logfile> will stop updating to the screen. Doing a Ctrl>-C and restarting the tail works fine, though. And I checked to make sure the logfile ...
0
votes
1answer
3k views

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 ...
24
votes
4answers
7k views

In tail -f, how do I filter out stuff that has certain keywords?

I want to tail -f my logs. However, I want to filter out everything that has the words: "ELB", "Pingdom", "Health"
2
votes
1answer
420 views

Multitail configuration:defaultcscheme isn't applied

Finally i got Multitail to work. The only problem is the Default Colorscheme isn't applied to a file i open with multitail, so have to go to the menu and apply it manually. My multitail.conf looks ...
2
votes
3answers
130 views

Search for a log pattern continuously

I am preparing a log watch dog but my concern is tailing always would blow up in some point. Thus, My concern is to monitor the log file always and if a pattern match occurs. Issue some commands on ...
7
votes
2answers
1k views

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

tail -f and then exit on matching string

I am trying to configure a startup script which will startup tomcat, monitor the catalina.out for the string "Server startup", and then run another process. I have been trying various combinations of ...
3
votes
2answers
1k views

Countinuous processing of tail -f output [closed]

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 ...
0
votes
3answers
454 views

Live statistics from a log file

I've got nginx running as a load balancer in front of several web servers. I'd like to be able to see live statistics with response time (maybe a histogram of the last 10 seconds?) I think Varnish ...
-1
votes
1answer
247 views

Windows Small Business Server 2011 64 Bit - where to find tail [closed]

I am looking for a tail alternative which can be installed on a Windows Small Business Server 2011 64 Bit (from this old thread)? I tried mTail, LogViewer and both failed. Do you have any suggestion ...
1
vote
3answers
158 views

Saving the out of tail

The following does not work... tail -f /var/log/mysql/general.log | grep Connect > /home/myfile.txt If I remove the "-f" switch then I am able to save the output to a text file, but it does not ...
1
vote
2answers
513 views

find files and search for within tail

The following is working as expected. find /opt/ -name "somefile.out" -exec grep 'Connection refused' {} \; | more But if I want to search only in the tail of the found files, I can not add tail or ...