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
3
votes
1 answer

multitail/ssh leaves processes hanging around after exit

I'm using multitail via SSH to filter log output on a number of servers like so: multitail -L "ssh foo.bar.com tail -n 0 -q -F /var/log/out.log | grep match" This works great, however when multitail exits multiple processes are left hanging around…
sehugg
  • 411
  • 1
  • 5
  • 13
3
votes
4 answers

Searching for a tail tool for Linux to colorize and suppress lines by regx?

Is there any tool that does both, colorize and filtering lines to suppress form output by regex?
user56543
2
votes
1 answer

send file difference from redhat to windows

Is there a way to send file content difference from Redhat to a server listening on a specific IP/Port on Windows? I initially thought tail -f command but then comes the IP part, anyone can help me?
maxjoy
  • 23
  • 2
2
votes
1 answer

Continuously tailing a rotating log file with date and time in filename

I have a log file in format log_name_YY-MM-DD_HH_mm.log. The log rotates every couple of hours and the new log is created containing the date and time of it's creation. Sometimes I need to tail the live output of this log with the tail -f command.…
CyberMuz
  • 335
  • 1
  • 2
  • 8
2
votes
2 answers

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 number of instances can be scrolling and…
user53029
  • 629
  • 3
  • 14
  • 36
2
votes
3 answers

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

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 log.txt file and deletes the old log.txt? It…
Guy395
  • 21
  • 1
  • 3
2
votes
2 answers

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 job every fifteen minutes unless there is a…
Brian
  • 21
  • 2
2
votes
1 answer

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 afford to read from the start, but tshark (or…
2
votes
3 answers

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 way). I can not use e.g. tail since the contents of…
Jim
  • 335
  • 2
  • 4
  • 8
2
votes
3 answers

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 ubuntu machine. tailing always seems to be not the…
Olgun Kaya
  • 137
  • 2
  • 10
2
votes
2 answers

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 tail -100 like this... find /opt/ -name…
shantanuo
  • 3,579
  • 8
  • 49
  • 66
2
votes
2 answers

"tail -f" style web application

I've been searching for a small but functional PHP script or similar that I can expose via apache. Basically I'd like what "tail -f /var/log/something" does, but visible via a web browser. I'm finding various solutions, but most of them operate with…
draeath
  • 366
  • 1
  • 6
2
votes
4 answers

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 there is a way without using a log file right? I…
Darius
  • 335
  • 5
  • 15
2
votes
3 answers

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}' I don't get anything ? What am I doing wrong ? Also,…
aneuryzm
  • 1,714
  • 5
  • 26
  • 41
2
votes
3 answers

Best tools for "ssh tail -f" style log file monitoring and analysis

I'm looking for a tool to monitor custom PHP Error logs/Apache and possibly Java logs on remote development servers. I'm not looking for a full production log system like Splunk, but something that's a little more flexible than an ssh terminal doing…
Dougnukem
  • 121
  • 1
  • 4