Observe multiple log files in one outputCombine input from multiple files/pipes without clobbering lines or...

Did anybody find out it was Anakin who blew up the command center?

Why error propagation in CBC mode encryption affect two blocks?

Retroactively modifying humans for Earth?

Do clerics commit a sin if they do not recite the liturgy of the hours?

Joining lists with same elements

Expressing an implication as ILP where each implication term comprises a chain of boolean ORs

Can I renew my USA passport book and passport card separately?

What are the occurences of total war in the Native Americans?

How long do you think advanced cybernetic implants would plausibly last?

How many petaflops does it take to land on the moon? What does Artemis need with an Aitken?

How to read Microware OS-9 RBF Filesystem under Windows / Linux?

How to sort a dictionary of lists and get the corresponding keys?

Contours of a national emergency in the United States

3D cryptic featuring Mao, Stalin and Simba's uncle

Which old Technic set included large yellow motor?

Unlock your Lock

Beginner to guitar playing - where should I begin?

What happened to the HDEV ISS Experiment? Is it over?

Docker compose volume syntax valid for Windows and Linux

Changing JPEG to RAW to use on Lightroom?

How do I remap "å" to type "å"?

Dealing with stress in coding interviews

How many birds in the bush?

Why does Windows store Wi-Fi passwords in a reversible format?



Observe multiple log files in one output


Combine input from multiple files/pipes without clobbering lines or blocking?Is it fine to use tail -f on large log filesHow to do a `tail -f` of log rotated files?Using tail to follow daily log file in BashHow can I monitor a file that fully recreates during its run?Show filename at begining of each line when tailing multiple files at once?Clear terminal window before tail -f outputHow to tail a log file by time?tail -f, without using pollingRunning multiple commands for multiple files on one lineUsing “tail” to follow a file without displaying the most recent lines






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







57















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






















  • 2





    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


















57















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






















  • 2





    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














57












57








57


8






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
















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.







logs tail






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 4 '12 at 23:35









Gilles

571k138 gold badges1180 silver badges1692 bronze badges




571k138 gold badges1180 silver badges1692 bronze badges










asked Dec 4 '12 at 11:13









stoflstofl

3881 gold badge3 silver badges5 bronze badges




3881 gold badge3 silver badges5 bronze badges











  • 2





    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














  • 2





    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








2




2





multitail is the king there. See Combine input from multiple files/pipes without clobbering lines or blocking?

– Gilles
Dec 4 '12 at 23:35





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





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










3 Answers
3






active

oldest

votes


















90















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





















  • 2





    Yes. It works! Thank you. I'd never expected that it would be SO easy.

    – stofl
    Dec 4 '12 at 11:37






  • 11





    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






  • 9





    My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

    – Denis Drescher
    Oct 4 '16 at 10:26













  • Validated also on Ubuntu 16.04 LTS

    – Ricardo
    May 12 '17 at 2:03











  • There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

    – flickerfly
    May 18 '18 at 16:20



















3















For some reason, answers along the lines of tail -f file1 file2 wasn't quite what I had in mind.



I want to know what happened in several logs sort of most recently 'locally', regardless of the global chronological order.



To do that, I used something more like watch -n1 tail -n10 file1 file2






share|improve this answer



































    0















    For the exercise i wrote small node utility that does the same thing as tail -f f1 f2 f3



    Splex:



    https://www.npmjs.com/package/splex



    The main "upgrade" is that lines are color coded per file name, and that you can have table-like interface.



    Another improvemtn, actually main reason I wrote this, is the ability to have .splexrc.json files in different folders, so instead having to type tail -f f1 f2 f3in one folder, then different files in other, you can write .splexrc.json file in root of your project and just type splex without file list arguments and it automatically stream relevant logs you enumerated in config file.






    share|improve this answer








    New contributor



    kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f57538%2fobserve-multiple-log-files-in-one-output%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      90















      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





















      • 2





        Yes. It works! Thank you. I'd never expected that it would be SO easy.

        – stofl
        Dec 4 '12 at 11:37






      • 11





        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






      • 9





        My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

        – Denis Drescher
        Oct 4 '16 at 10:26













      • Validated also on Ubuntu 16.04 LTS

        – Ricardo
        May 12 '17 at 2:03











      • There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

        – flickerfly
        May 18 '18 at 16:20
















      90















      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





















      • 2





        Yes. It works! Thank you. I'd never expected that it would be SO easy.

        – stofl
        Dec 4 '12 at 11:37






      • 11





        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






      • 9





        My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

        – Denis Drescher
        Oct 4 '16 at 10:26













      • Validated also on Ubuntu 16.04 LTS

        – Ricardo
        May 12 '17 at 2:03











      • There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

        – flickerfly
        May 18 '18 at 16:20














      90














      90










      90









      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













      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












      share|improve this answer



      share|improve this answer










      answered Dec 4 '12 at 11:21









      D_ByeD_Bye

      11.1k1 gold badge33 silver badges27 bronze badges




      11.1k1 gold badge33 silver badges27 bronze badges











      • 2





        Yes. It works! Thank you. I'd never expected that it would be SO easy.

        – stofl
        Dec 4 '12 at 11:37






      • 11





        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






      • 9





        My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

        – Denis Drescher
        Oct 4 '16 at 10:26













      • Validated also on Ubuntu 16.04 LTS

        – Ricardo
        May 12 '17 at 2:03











      • There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

        – flickerfly
        May 18 '18 at 16:20














      • 2





        Yes. It works! Thank you. I'd never expected that it would be SO easy.

        – stofl
        Dec 4 '12 at 11:37






      • 11





        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






      • 9





        My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

        – Denis Drescher
        Oct 4 '16 at 10:26













      • Validated also on Ubuntu 16.04 LTS

        – Ricardo
        May 12 '17 at 2:03











      • There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

        – flickerfly
        May 18 '18 at 16:20








      2




      2





      Yes. It works! Thank you. I'd never expected that it would be SO easy.

      – stofl
      Dec 4 '12 at 11:37





      Yes. It works! Thank you. I'd never expected that it would be SO easy.

      – stofl
      Dec 4 '12 at 11:37




      11




      11





      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





      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




      9




      9





      My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

      – Denis Drescher
      Oct 4 '16 at 10:26







      My new favorite parameter combo is tail -qF *.log: -q to hide the file names and -F, as Arcege pointed out, to let tail follow the name rather than the descriptor because my log files are being rotated.

      – Denis Drescher
      Oct 4 '16 at 10:26















      Validated also on Ubuntu 16.04 LTS

      – Ricardo
      May 12 '17 at 2:03





      Validated also on Ubuntu 16.04 LTS

      – Ricardo
      May 12 '17 at 2:03













      There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

      – flickerfly
      May 18 '18 at 16:20





      There is a limit to this. I have a folder with log files by PID for a worker that gets started for every new job in a queue (So lots of PIDs). If I tail -f /var/log/folder/* it returns the error "unable to execute /usr/bin/tail: Argument list too long"

      – flickerfly
      May 18 '18 at 16:20













      3















      For some reason, answers along the lines of tail -f file1 file2 wasn't quite what I had in mind.



      I want to know what happened in several logs sort of most recently 'locally', regardless of the global chronological order.



      To do that, I used something more like watch -n1 tail -n10 file1 file2






      share|improve this answer
































        3















        For some reason, answers along the lines of tail -f file1 file2 wasn't quite what I had in mind.



        I want to know what happened in several logs sort of most recently 'locally', regardless of the global chronological order.



        To do that, I used something more like watch -n1 tail -n10 file1 file2






        share|improve this answer






























          3














          3










          3









          For some reason, answers along the lines of tail -f file1 file2 wasn't quite what I had in mind.



          I want to know what happened in several logs sort of most recently 'locally', regardless of the global chronological order.



          To do that, I used something more like watch -n1 tail -n10 file1 file2






          share|improve this answer















          For some reason, answers along the lines of tail -f file1 file2 wasn't quite what I had in mind.



          I want to know what happened in several logs sort of most recently 'locally', regardless of the global chronological order.



          To do that, I used something more like watch -n1 tail -n10 file1 file2







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Oct 25 '18 at 16:27









          Jeff Schaller

          49.3k11 gold badges72 silver badges163 bronze badges




          49.3k11 gold badges72 silver badges163 bronze badges










          answered Oct 25 '18 at 15:41









          sg_mansg_man

          311 bronze badge




          311 bronze badge


























              0















              For the exercise i wrote small node utility that does the same thing as tail -f f1 f2 f3



              Splex:



              https://www.npmjs.com/package/splex



              The main "upgrade" is that lines are color coded per file name, and that you can have table-like interface.



              Another improvemtn, actually main reason I wrote this, is the ability to have .splexrc.json files in different folders, so instead having to type tail -f f1 f2 f3in one folder, then different files in other, you can write .splexrc.json file in root of your project and just type splex without file list arguments and it automatically stream relevant logs you enumerated in config file.






              share|improve this answer








              New contributor



              kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.


























                0















                For the exercise i wrote small node utility that does the same thing as tail -f f1 f2 f3



                Splex:



                https://www.npmjs.com/package/splex



                The main "upgrade" is that lines are color coded per file name, and that you can have table-like interface.



                Another improvemtn, actually main reason I wrote this, is the ability to have .splexrc.json files in different folders, so instead having to type tail -f f1 f2 f3in one folder, then different files in other, you can write .splexrc.json file in root of your project and just type splex without file list arguments and it automatically stream relevant logs you enumerated in config file.






                share|improve this answer








                New contributor



                kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.
























                  0














                  0










                  0









                  For the exercise i wrote small node utility that does the same thing as tail -f f1 f2 f3



                  Splex:



                  https://www.npmjs.com/package/splex



                  The main "upgrade" is that lines are color coded per file name, and that you can have table-like interface.



                  Another improvemtn, actually main reason I wrote this, is the ability to have .splexrc.json files in different folders, so instead having to type tail -f f1 f2 f3in one folder, then different files in other, you can write .splexrc.json file in root of your project and just type splex without file list arguments and it automatically stream relevant logs you enumerated in config file.






                  share|improve this answer








                  New contributor



                  kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  For the exercise i wrote small node utility that does the same thing as tail -f f1 f2 f3



                  Splex:



                  https://www.npmjs.com/package/splex



                  The main "upgrade" is that lines are color coded per file name, and that you can have table-like interface.



                  Another improvemtn, actually main reason I wrote this, is the ability to have .splexrc.json files in different folders, so instead having to type tail -f f1 f2 f3in one folder, then different files in other, you can write .splexrc.json file in root of your project and just type splex without file list arguments and it automatically stream relevant logs you enumerated in config file.







                  share|improve this answer








                  New contributor



                  kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share|improve this answer



                  share|improve this answer






                  New contributor



                  kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  answered 2 hours ago









                  kodishakodisha

                  1011 bronze badge




                  1011 bronze badge




                  New contributor



                  kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




                  New contributor




                  kodisha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



































                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f57538%2fobserve-multiple-log-files-in-one-output%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

                      The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

                      Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...