Unix command to view the end of a file

learn more… | top users | synonyms

18
votes
4answers
766 views

Linux command line log viewer which allows auto tail AND searching?

I use tail -f in my Linux shell, to view log files, as I like how it auto-updates with the incoming text: I like to see the new stuff come scrolling in. However, I also like the search functionality ...
0
votes
1answer
39 views

How to grep for line numbers in a binary file?

I'm on Centos 5 Linux and using GNU grep v2.5.1 and looking at a 36GB log file. It is huge and I need to find around a million lines starting from the occurrence of a string 6307459 in the log file ...
1
vote
0answers
45 views

Can vim be used to view a growing file?

I often use vim's view for viewing files. Is there a way to use it for a growing file so that I can see the progress as it's happening? Something similar to tail -f or less +F I have two use ...
1
vote
1answer
55 views

piping tail -f into sed or awk

There is another question which is nearly the same, but none of the suggestions from its answer works for me: Piping tail -f into awk I'm trying to tail -f a logfile but want to replace \r with \n ...
0
votes
0answers
14 views

Is there a way to make tail output newlines?

When I do tail -f $file I see newlines as \n. For example: permissions array(\n 0 => \n stdClass::__set_state Is there a way to make it turn into permissions array( 0 => ...
0
votes
0answers
62 views

Copy huge file skipping first line using dd in Linux

I was trying to copy the content of a huge file (10GB) to another skipping the first line (as in head -n1). I tried multiple ways of head, tail, awk and sed. Settled on using tail -n+2 > ./xab.1 ...
-1
votes
1answer
172 views

Scrolling in terminal (OS X) when running tail -f and ssh-ed into a machine yields some strange characters

I'm ssh-ed into a remote machine and running tail -f. Every time I scroll up/down using the trackpad, it yields some strange characters, like OB^[OB^[OB^[OB^[OB^[OOB^[OB^[OB^[OB^[OB^[O This didn't ...
0
votes
1answer
38 views

Why chain of commands that runs fine on local doesn't run on SSH?

There's something funny with tail -f and grep -o combination when running over ssh. So on local server, if you do tail -f /path/myfile.log |grep -o keyword It grep just fine. But if you run it on ...
0
votes
0answers
62 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
74 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?
1
vote
1answer
1k 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
33 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 ...
2
votes
1answer
146 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 ...
1
vote
2answers
133 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
62 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.
1
vote
1answer
2k 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
107 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
112 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 ...
2
votes
2answers
138 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
75 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
108 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 ...
3
votes
2answers
1k 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
1answer
3k 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 ...
0
votes
1answer
440 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
1k 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 ...
4
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. ...
2
votes
1answer
96 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
58 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?
2
votes
1answer
648 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 ...
3
votes
1answer
597 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: ...
0
votes
0answers
139 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 ...
9
votes
2answers
6k 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 ...
0
votes
2answers
204 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. ...
1
vote
1answer
59 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 ...
2
votes
1answer
207 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
157 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?
2
votes
1answer
164 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
0answers
175 views

Analogue of the “tail -f example.log” command in Windows?

Is there a similar command in Windows?
1
vote
2answers
180 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+) ...
0
votes
2answers
995 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, ...
0
votes
1answer
7k views

How to exit text files/logs when viewing them in Putty

I'm new to putty. Connected to a linux server to view/read some files. So, I opened a text log file that is constantly being updated, so I'm getting new lines every second. Is there a ...
1
vote
2answers
156 views

Start a few programs in a split terminal

I want to start a few programs with a single launch script and monitor their outputs to the console. The easiest way would be to launch in background an xterm for each program, but that's not very ...
0
votes
1answer
135 views

Show starting with a special line until a special line regex for Linux tail command

I use that notation at my log files: [something-something] somethings are necessary and variable length characters and numbers. My special log file includes line that has characters explained above. ...
-1
votes
2answers
111 views

Show matched lines for a given regex at Linux

I use that notation at my log files: [something-something] somethings are necessary and variable length characters and numbers. My special log file includes line that has characters explained above. ...
6
votes
2answers
946 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?
0
votes
2answers
997 views

Run two watch commands simultaneously

I want to run two executables in the foreground by typing one line of code or running a shell script. These executables watch a directory and recompile some code while outputting their status to ...
1
vote
1answer
604 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
0answers
310 views

Notepad++ Document Monitor with Remote File

I am trying to use Notepad++ to monitor a log file using the plugin Document Monitor. This works great on local files but does not work on remote files. I have tried both mapping the remote drive and ...
2
votes
1answer
725 views

How to pipe output of tail -F on OS X?

I've recently moved from Ubuntu to OS X and I'm finding that the 'tail' command behaves differently. On Ubuntu I could run tail -f xyzzy.log | espeak (To have the computer read me what's happening ...
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 ...