Unix command to view the end of a file

learn more… | top users | synonyms

0
votes
0answers
15 views

Insert blank lines when using 'tail -f' in cmder

I recently switched from Cygwin to cmder mostly due to it's awesome interface and all that cool pre-configured stuff. ( http://bliker.github.io/cmder/ ) I am using tail -f very often and when I am ...
6
votes
1answer
48 views

tail -f file stops tailing on rename

I want to tail -f file but going tailing it after a mv. The tail manpage tells me: -f means --follow=descriptor so a mv should not change the inode? Why does tail -f stop working after the rename?
2
votes
1answer
77 views

tail a file without wrapping the lines on a mac

I want to tail -f a file that may contain very long lines. I would also like to see one line per screen line and scroll to the side if necessary, much like Vim's zL and zH, so no line wrapping, Is ...
5
votes
2answers
2k views

Equivalent of 'clear' command when using tail -f

I am using the tail -f command to follow an error log, and I often want to "clear" the terminal, much in the same way that the clear unix command moves everything above the top of the window. Is there ...
10
votes
2answers
2k views

Using 'head' or 'tail' on HUGE text file - 19 GB

I have a problem with viewing chunks of a very large text file. This file, approximately 19 GB, is obviously too big to view by any traditional means. I have tried head 1 and tail 1 (head -n 1 ...
1
vote
1answer
55 views

What's the best way to view lines X through Y of a large file?

I have a very large text file and I want to view, say, lines 2000 through 2010 (with the line numbers included) I know one sort of roundabout way of getting there: sc -l [file] cat -n [file] | tail ...
4
votes
1answer
2k views

How to easily break up a text file into pieces smaller than a threshold?

I have some text files that are 100 to 300 MB in length that I want to view in Emacs, but my Emacs gets into some performance issues opening and traversing such large files. Therefore, I'm looking ...
3
votes
3answers
1k views

Is there anyway to `cat` two remote `tail -f` streams via SSH?

I wanted to combine two continuous text streams generated by tail -f into one and watch them in the same screen. Is it possible? Both text streams are line-oriented (e.g. logs), if that helps. ...
1
vote
1answer
368 views

Tail the filename, not the file

In UNIX (OS X BSD to be precise), I have a "tail -f" command on a log file. From time to time I want to delete this log file so I can more easily review it in my text editor. I delete the file, and ...
10
votes
1answer
11k views

Combine tail -f with grep?

Hi I wanna keep looking at a log file, but I also don't wanna see irrelevant stuff, I'm only interested in anything with "foobar" in it. So if I was tailing the file I would do tail file | grep ...
11
votes
11answers
15k views

Monitoring a file until a string is found

I am using tail -f to monitor a log file that is being actively written to. When a certain string is written to the log file, I want to quit the monitoring, and continue with the rest of my script. ...
6
votes
2answers
769 views

Is there a tail -f equivalent for ls?

Basically the question is in the title. I want to monitor a directory for new files that are written or deleted, the way I can monitor a log file with tail -f. Is this possible?
3
votes
2answers
931 views

Filter tail command through multiple grep commands to separate files

What I am trying to do is filter the output of one log file into separated log files based on a grep filter. tail -f test.log | tee >(grep "Error" > error.log) >(grep "Warning"" > warning.log) ...
4
votes
3answers
1k views

Tail multiple files while piping one of the files through grep

I want to use tail follow two log files, but one of the log files has too much data, so I want it filtered with grep. tail -f file1 file2|grep mySearch The issue with this is that both files are ...
1
vote
1answer
597 views

Other ways to increase max open files?

I have an application which keeps giving me the following error. tail: inotify cannot be used, reverting to polling: Too many open files I have already followed all the advice I've been able to ...
2
votes
2answers
31 views

Discard content of logfile, keeping tail

I'm looking for a way how to discard content of the logfile, leaving only defined tail. In two steps it's quite easy: tail -n1000 alert_migtst.log > alert_migtst.tail mv -f alert_migtst.tail ...
66
votes
10answers
39k views

Is it possible to `tail -f` the output of `dmesg`?

Want to do something like dmesg | tail -f but it doesn't work: I use Mac OSX 10.6.7, by doing that the tail will exit, instead of monitoring the output. I wonder if there is any way to do it, or ...
1
vote
2answers
584 views

tail stops working

I am tailing a file in unix. It stops working sometimes and I have to re-run the command. Anyone know why this happens?
1
vote
2answers
110 views

Tail and grep recursively?

Trying to tail though a list of domains to search for a hacker code. All the files that I'm looking for are the same so I was trying something like this: grep -rnl * -e "Ai9LbaFz7lC13SwzDxAYT72vwA" ...
1
vote
3answers
54 views

Is it possible to tail -f an external web resource?

Can I tail -f an output from http://example.com? I want to monitor external JSON file.
28
votes
2answers
5k views

Using watch with pipes

I'd like to run this command: watch -n 1 tail -n 200 log/site_dev.log | grep Doctrine But it does not run, because "I think" that the grep tries to run on the watch instead of the tail... Is there ...
1
vote
1answer
1k views

Extract the contents of ELF and write to binary file

I have been trying to extract the contents of a firmware and putting it to a binary file, but with no success. I see the right hex contents, but am not sure how to laid them in bits into a file. ...
4
votes
1answer
61 views

Unix /Linux show the last part of a file with line numbers

Is there a way to make tail show a line number in front of the last lines it show so that it show the growth of the file when using it in a script. e.g: when using it in a script like this one: ...
2
votes
1answer
90 views

Why tail -f is not working for a proc file?

I have a proc file which is updated by a driver. In user space I am reading using tail. It is working fine, But when i give -f option for tail, It is not working. This means it is reading file ...
1
vote
2answers
152 views

Is there any tail like tool supporting WebDav

My problem is that that a proprietary SaaS platform im developing on/for only provides log files via WebDav. During development this log files can get quite large by the end of the day (think 200 Mb+) ...
2
votes
2answers
93 views

Use tail directly on website data, or another utility needed?

I am planning to extract a single field of data from the last line of data on a website to populate an RRD database. I'm running Linux. The website is: ...
0
votes
2answers
62 views

display whole stream while highlighting with grep

I often use tail -f | grep someregex on log files. I have grep liased to grep ---color=auto so my matches are highlighted. If I want to see my matches in the context of the whole stream, how would I ...
0
votes
1answer
101 views

Running `tail -F $file` then removing outputted lines

Long story short; I'm running this command to stream a forever growing audio file audio.mpg into ffmpeg tail -F audio.mp3 | ffmpeg -i - http://127.0.0.1:8090/feed1.ffm audio.mp3 is being SSH'd from ...
0
votes
1answer
331 views

Installing Multitail on RHEL 5.3

I'm trying to install Multitail on a RHEL 5.3 machine, but get the following error as the root user. Should this be accessible from one of the default RPM repositories or do I need to add a new ...
1
vote
3answers
812 views

Coloured output when tailing php error log

I'm trying to find a way (through escape characters or software) to display coloured lines in my php error log. Right now I'm reading from them (live) with tail -n 50 -f /var/log/apache2/error.log ...
0
votes
2answers
178 views

Issues with Multitail 5.2.11 Install on RHEL5.3

I'm having some difficulty getting Multitail installed on a Linux box. Their site mentions that Multitail requires the ncurses library, but systems like *BSD and Linux have this library by default. ...
2
votes
1answer
537 views

How to display/monitor the tail of a growing CSV file in tabular format?

I am looking for a way to display an open, "live" CSV file under Windows 7. For example, I have a proprietary program running that is generating log data in CSV format. I'd like to keep an eye on what ...
2
votes
1answer
88 views

quick tail on a huge file on linux

I need to get the last 10 million lines of a 100 million lines file. tail -n 10000000 $in_file>$out_file however the above command took more than 1 day and is still going. I guess I can use the ...
2
votes
2answers
57 views

How quickly is the log file growing?

I use `tail -f logfile' to view the log in real time. I also need to know how many lines are appended to the logfile per second. Is there a command to do this?
3
votes
5answers
1k views

Linux application to tail multiple log files (like OS X Console.app)

I'm constantly tailing log files. At any given time I've got half a dozen terminal windows open that are simply running tail -f . In OS X, the Console app is brilliant. All the usual log files are ...
3
votes
1answer
484 views

How to monitor files matching a wildcard with multitail

I have a 'logs' directory full of log files whose names follow this format: XXX-YYYY-DATE-N.txt where N is a number that grows bigger as time goes on. So for example right now I have: ...
2
votes
3answers
547 views

How to grab a random section in the middle of a huge file?

I have a huge log file of around 3.5 GB and would like to sample random sections in the middle of say 10 MB for the purpose of debugging what my application is doing. I could use head or tail ...
2
votes
2answers
1k views

Realtime linux colored tail with filtering support for tomcat?

I am looking for a tail, gui or console based, that would be able to filter and color messages from tomcat based on their level: INFO, WARN, ERROR, CRITICAL. Another feature that is quite importat ...
0
votes
0answers
126 views

Tail for Powershell v3?

I'm running the following command in my powershell terminal: Get-Content C:\wamp\bin\apache\apache2.2.22\logs\lysol-dbau.access.log -Tail 10 -Wait So I want to start with the last 10 lines of the ...
7
votes
2answers
4k views

Opposite of tail: all lines except the last n lines

How can I discard the last n lines of a file with a unix command line filter? That would be sort of the opposite of tail: tail discards the first n lines but pipes the rest through, but I want the ...
2
votes
1answer
191 views

Delete first lines from a Unicode html file

I have an HTML file that is in UTF-8 format and I want to remove the first five lines from it. I've tried using sed but it doesn't work in this case: sed "1,5d" Result.html>small2 It actually ...
1
vote
1answer
535 views

tail -f updates slowly

I'm not sure why, but on my Macbook Pro running lion I get slow updates when I issue "tail -f" on a log file that is being written to. I used to use this command all the time at my last company but ...
1
vote
1answer
109 views

Is there a command-line tool that can read from a file and write the file's contents to stdout, blocking on EOF?

Is there anything like tail –f that also works well with binary files and supports exit conditions like "on pid X death" or so?
13
votes
6answers
16k views

Windows XP equivalent of “tail -f”?

Is there way have windows XP show me updates to a log file as they happen? I'm thinking of something similar to tail -f <file path> in the linux realm.
2
votes
1answer
142 views

Tail -f on files that don't exist yet

I have a program that for each run generates a new log file. To watch what's going on, I'd like to tail -f the log - only problem is that I don't actually know the file name in advance. So, is there ...
0
votes
4answers
1k views

Issues ending script with tail -f

I use the following script to restart a Java server running on a Solaris Sun 5.10 box... pkill -9 java nohup ./start_java.sh & tail -f smx.log I SSH to the box (using Putty) to run the ...
5
votes
3answers
2k views

tail -f not tracking file changes

I was recently looking into using tail -f to monitor some text files like so: tail -f /var/sometext However, when I did some testing, it doesn't seem to work. What I did was I created a new file and ...
6
votes
4answers
2k views

make tail wait for a file to exist

tail -f bar/somefile.log would fail immediately when somefile.log does not exist. How do I make tail indefinitely wait for that file to be created (which will happen in a few moments)? Update: using ...
0
votes
2answers
871 views

Can't scroll tail up or down on server

Possibly related to Tail keeps snapping to the bottom after i scroll up with mousewheel I can view my regular log files (on my local machine I mean) with tail -f and can scroll up or down. However, ...