Tagged Questions
1
vote
2answers
138 views
How to use tail -f with grep to show surrounding lines
I would like to see the output in a logfile greped by only one domain but also the following two lines.
Example:
tail -f /var/log/apache2/modsec_audit.log |grep mydomain.de
this shows all lines, ...
8
votes
2answers
590 views
How to have tail -f show colored output with vim?
In this question, Gilles answered
Yet another possibility is to run tail -f in an Emacs shell buffer and use Emacs's syntax coloring abilities.
Because I'm a vim user, I'd like to do this with ...
7
votes
4answers
559 views
What is the easiest way to execute text from tail at the command line?
Sometimes I'm working on a new (ubuntu) box and I type git and am alerted:
The program 'git' is currently not installed. You can install it by typing:
apt-get install git-core
If that happens I ...
3
votes
2answers
79 views
Output the changes to a log file
If I use
tail -f *filename*
I get a real nice display of whatever is changing in a given file. However, sometimes I want to be able to search this text or otherwise look it over slowly.
Is ...
15
votes
3answers
4k views
How does the “tail” command's “-f” parameter work?
$ tail -f testfile
the command is supposed to show the latest entries in the specified file, in real-time right? But that's not happening. Please correct me, if what I intend it to do is wrong...
I ...
2
votes
2answers
1k views
Add carriage return to output of `tail` while using `grep`
I'm looking to refactor the following command:
tail -f production.log |
grep -e "Processing " -e "compatible;" -e "Completed in " -e
This is the output of the command:
Processing ...
4
votes
1answer
1k views
Reading from a continuously changing logfile
There is /location/of/thefile, which is a continuously changing logfile. The average density of refreshes is 4 per minute, the possible maximal refresh rate could be 30-40 per minute. Every refresh ...
55
votes
12answers
12k views
How to have tail -f show colored output
I'd like to be able to tail the output of a server log file that has messages like:
INFO
SEVERE
etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I ...
10
votes
7answers
6k views
grep and tail -f?
Is it possible to do a tail -f (or similar) on a file, and grep it at the same time? I wouldn't mind other commands just looking for that kind of behavior.