xtail on OS X

Dunno about porting that, but I made a Cocoa wrapper app for tailing files. Still, using a terminal window is much easier.

Since this trick is new to me, I'll post it here. You can use the -n command to tell tail where to start dumping the file. An argument of +1 means start on the first line, so the command
Code:
% [b]tail -f -n +1 /var/log/mail.log[/b]
would dump the whole mail.log file and then proceed to wait for updates to also display.

-Rob
 
that helps, but what I need to do is tail multiple log. with xtail I usually us this command sequence:

xtail */*.log

and it dumps every new line to the terminal window. can I recurse through multiple logs with tail?

-jason
 
Woah. I've never tried that. Wouldn't that get confusing?

Anyway, best I can say is, "Give it a try!"

-Rob
 
I guess it can be confusing, but it is nice to be able to see a variety of log data in one screen especially when you are trying to track down funcky errors...i/we use the recursive xtail during java/jsp web app development
 
Still can't help you with xtail, but I just tried tail -f junk* & on a linux box, and it had the result you're looking for. If that's how regular tail behaves, it ought to be the same on Mac OS X.

You probably knew this already, but each time tail shows lines from a different file, it prints a line like this:
Code:
==> filename <<=
Nice trick, that tail.

-Rob
 
here is what i did and where i got it:

1. wget http://www.unicom.com/sw/xtail/xtail-2.1.tar.gz
2. zcat xtail-2.1.tar.gz | tar xf -
3. cd xtail-2.1/
4. ./configure --prefix=/usr/local
5. make
6. sudo mkdir -p /usr/local/man/man1
7. sudo make install

xtail will let you tail multiple files recursively

example: xtail */*.log

enjoy,
jason
 
Back
Top