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.

Is there an easy way to do something like tail -f mylogfile but to have the changes of more than one file displayed (maybe with the file name added as prefix to each line)? Or maybe a GUI tool? I am running Debian.

share|improve this question
1  
multitail is the king there. See Combine input from multiple files/pipes without clobbering lines or blocking? –  Gilles Dec 4 '12 at 23:35
    
Thank you for that tip. This is a really helpful tool. It can also truncate files, clear the screen with one shortcut and so on. –  stofl Dec 9 '12 at 10:36

1 Answer 1

up vote 7 down vote accepted

Have you tried tail -f file1 file2? It appears to do exactly what you want, at least on my FreeBSD machine. Perhaps the tail that comes with a Debian system can do it too?

share|improve this answer
    
Yes. It works! Thank you. I'd never expected that it would be SO easy. –  stofl Dec 4 '12 at 11:37
2  
I usually use -F instead since a number of files may get truncated as I'm restarting server programs. –  Arcege Dec 4 '12 at 23:37
    
Thank you for that flag. I didn't knew it. –  stofl Dec 9 '12 at 10:37

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.