Unix command to view the end of a file
2
votes
1answer
27 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 ...
1
vote
2answers
40 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
81 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
67 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
42 views
Most pager utility in Tail mode does not always tail from end of file
I use many most sessions in tmux sessions on a daily basis, and in general I love it. However I've noticed some files never seem to want to tail properly (using F once loaded in most); I can skip to ...
0
votes
0answers
50 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 ...
3
votes
2answers
167 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
1answer
71 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
38 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
98 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
60 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?
0
votes
1answer
63 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
57 views
0
votes
1answer
64 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
305 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
823 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
97 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
66 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
76 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
354 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
201 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
214 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
169 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 ...
1
vote
1answer
209 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 ...
1
vote
2answers
337 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 ...
2
votes
2answers
482 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 ...
8
votes
2answers
880 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 ...
4
votes
4answers
554 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 ...
1
vote
1answer
275 views
Monitoring log files over smb
I am monitoring a couple of windows 2k3 servers from a mac running Os x Lion. I use smb to connect to the server's file system, navigate to the folder where the log files are and open them with ...
0
votes
1answer
176 views
tail -f makes tomcat die
We have a build file that does a git checkout, compiles a war, deploys to tomcat and then tail -f 's the catalina.log. If the ssh session over which this is done somehow dies, even though we are only ...
6
votes
1answer
2k 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 ...
2
votes
1answer
244 views
running tail -f on a server which connects to another server over ssh
I have been using the following command to connect to a server, which connects to another server and runs tail -f on it:
ssh server1.com ssh server2.com tail -f file.log
This so far works fine. ...
1
vote
1answer
254 views
pipe from ssh to windows “ssh server 'tail err.log' | tool.exe”
I want to live monitor a logfile generated on a remote linux host with a windows tool.
I'm looking for something like:
$> ssh remoteserver 'tail -F /var/log/err.log' | tool.exe
But on Windows. ...
0
votes
1answer
193 views
How to find the last match of a string in a bunch of files
I have a bunch of files, I'd like to find the last match of a string in each of them.
grep text *.file gives me all the matches not the last ones.
ls *.file | xargs grep text | tail -n 1 gives me ...
2
votes
2answers
632 views
GUI for tail for Linux
Could someone recommend a graphical tail kind of document viewer? So that I could open a document, scroll up and down, etc. and that the document would refresh itself automatically (without prompting, ...
1
vote
1answer
163 views
^L while tail -f is running
I frequently use tail to monitor errors:
tail -f /var/log/apache2/error_log
I can use the shortcut cmd+K to clear the screen (OSX), but I've grown accustomed to using ^L in other linuxy situations. ...
3
votes
5answers
471 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 ...
2
votes
0answers
223 views
tail -f is not updating on AFP mounted share
I am running Mac OS 10.6.8
I have mounted a network drive, whose file I need to watch. I was planning on using tail.
When I run the following:
tail -f /Volumes/Cache-A/TransferLog.txt
I end up ...
1
vote
1answer
207 views
Equivalent of tail/less --follow-name under OS X
I need to tail -f a log file that is rotated.
This is the exact same issue as the one here, but on OS X:
Why does less tail mode stop working?
So how can I constantly track a file whose inode might ...
0
votes
2answers
179 views
How can I have ls follow the content of a directory like tail -f does on a file
I want to basically continuously update the file list of a directory similar to how tail does with the -f flag on a file.
is there any reasonable way to do this?
2
votes
1answer
106 views
Tail keeps snapping to the bottom after i scroll up with mousewheel
I'm having a problem with tail in Xubuntu (Xfce 4). In my previous ubuntu install (Ubuntu 9.10), if i was tailing a file with tail -f myfile, i could scroll up with the mousewheel to look at an ...
2
votes
2answers
272 views
appending timestamp to tail -f results
I would like to have a timestamp printed in front of every line that comes out of a "tail -f outputfile", so that I know when is each line printed in. Something like:
[...]
20110617_070222:results ...
22
votes
8answers
13k 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 ...
0
votes
1answer
269 views
How to use tail -f with sound?
I am trying to use tail -f and play a sound everytime a new line appears.
I tried this:
for i in tail -f myFile; do aplay alert.wav; done;
Which kinda worked, the output is:
Playing WAVE ...
2
votes
3answers
281 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 ...
4
votes
7answers
4k 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.
...
1
vote
2answers
273 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?
0
votes
1answer
178 views
Shell doesn't display input characters after “tail -f”
I use "tail -f" to monitor log files. After interrupted by ctrl-c, the shell doesn't display my input chars from keyboard any more. Something like
terminal> tail -f /log/a.log
then ctrl-c
...
1
vote
1answer
226 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 ...
1
vote
2answers
2k views
How to use tail.exe : Windows 2003 Resource kit tool
Tail.exe from Windows 2003 Resource kit link to download page
I tried "option -f filename.xyz" - this doesnot seem to update.
In my .net app, log file is updated using this code :
FileStream ...
