Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For logrotated files one usually uses tail -F instead of tail -f to follow the log file contents. Does multitail(1) automatically follow the name instead of the inode (which likely changes with the log rotation)?

I sifted through the documentation and also searched on the web, but wasn't able to come up with a conclusive answer.


Thanks to the accepted answer I found that the man page does mention the option I wanted, but uses the term "descriptor" instead of "inode". So this question and the answer should be the glue for the next person researching the topic.

-f Follow the following filename, not the descriptor.

--follow-all
  For all files after this switch: follow the following filename, not the descriptor.
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

According to the multitail manual:

There are a few other options not fitting elsewhere, these are:
-f  This makes MultiTail follow the file. In case the original file gets
    renamed and a new file is created with the original filename, MultiTail
    will start watching the file with the original filename (the one you
    entered).

To me, this implies that by default it follows by inode / file descriptor rather than filename.

A cursory reading of the source bears this out; in exec.c:79, the follow_filename var (set in cmdline.c:889 or ui.c:966) defines whether the follow-by-filename flag (-F, --follow=name, etc.) is passed to tail.

share|improve this answer
    
Thanks, that's it. I see that yet again it was mys search term which was the limiting factor. –  0xC0000022L Jan 31 '13 at 0:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.