Strange output from terminal `exit` command is this a virus?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







16















I don't think that I have seen this before, but whenever I run exit in terminal I get a very strange output.



This is what it looks like:



logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]


And when I remove ~/.bash_sessions I get this output.



logout
Saving session...-bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.session: No such file or directory
touch: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
-bash: history: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: cannot create: No such file or directory

...copying shared history...cp: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory

...saving history...cat: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
-bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory
-bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
truncating history files...
...completed.
shlock: open(~/.bash_sessions/shlock6026): No such file or directory

[Process completed]


The other thing is it recreates the .bash_sessions folder if it got removed.



Is this some kind of virus or just that I haven't paid that much attention to it, or is this something that Apple added in El Capitan (I'm running OS X 10.11 Build 15A262E) or what else could it be?



Also when I run login <myusername> then I run exit I do not get this odd output. It only seems to be when closing out of terminal.



Note: I have replaced /Users/myusername with ~/ instead. I have also removed my .bash_profile to make sure it wasn't that.










share|improve this question































    16















    I don't think that I have seen this before, but whenever I run exit in terminal I get a very strange output.



    This is what it looks like:



    logout
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.

    [Process completed]


    And when I remove ~/.bash_sessions I get this output.



    logout
    Saving session...-bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.session: No such file or directory
    touch: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
    -bash: history: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: cannot create: No such file or directory

    ...copying shared history...cp: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory

    ...saving history...cat: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
    -bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory
    -bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
    truncating history files...
    ...completed.
    shlock: open(~/.bash_sessions/shlock6026): No such file or directory

    [Process completed]


    The other thing is it recreates the .bash_sessions folder if it got removed.



    Is this some kind of virus or just that I haven't paid that much attention to it, or is this something that Apple added in El Capitan (I'm running OS X 10.11 Build 15A262E) or what else could it be?



    Also when I run login <myusername> then I run exit I do not get this odd output. It only seems to be when closing out of terminal.



    Note: I have replaced /Users/myusername with ~/ instead. I have also removed my .bash_profile to make sure it wasn't that.










    share|improve this question



























      16












      16








      16


      5






      I don't think that I have seen this before, but whenever I run exit in terminal I get a very strange output.



      This is what it looks like:



      logout
      Saving session...
      ...copying shared history...
      ...saving history...truncating history files...
      ...completed.

      [Process completed]


      And when I remove ~/.bash_sessions I get this output.



      logout
      Saving session...-bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.session: No such file or directory
      touch: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
      -bash: history: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: cannot create: No such file or directory

      ...copying shared history...cp: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory

      ...saving history...cat: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
      -bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory
      -bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
      truncating history files...
      ...completed.
      shlock: open(~/.bash_sessions/shlock6026): No such file or directory

      [Process completed]


      The other thing is it recreates the .bash_sessions folder if it got removed.



      Is this some kind of virus or just that I haven't paid that much attention to it, or is this something that Apple added in El Capitan (I'm running OS X 10.11 Build 15A262E) or what else could it be?



      Also when I run login <myusername> then I run exit I do not get this odd output. It only seems to be when closing out of terminal.



      Note: I have replaced /Users/myusername with ~/ instead. I have also removed my .bash_profile to make sure it wasn't that.










      share|improve this question
















      I don't think that I have seen this before, but whenever I run exit in terminal I get a very strange output.



      This is what it looks like:



      logout
      Saving session...
      ...copying shared history...
      ...saving history...truncating history files...
      ...completed.

      [Process completed]


      And when I remove ~/.bash_sessions I get this output.



      logout
      Saving session...-bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.session: No such file or directory
      touch: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
      -bash: history: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: cannot create: No such file or directory

      ...copying shared history...cp: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory

      ...saving history...cat: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
      -bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.history: No such file or directory
      -bash: ~/.bash_sessions/EBDD3E18-8D29-42DA-B32C-DD4491951FC0.historynew: No such file or directory
      truncating history files...
      ...completed.
      shlock: open(~/.bash_sessions/shlock6026): No such file or directory

      [Process completed]


      The other thing is it recreates the .bash_sessions folder if it got removed.



      Is this some kind of virus or just that I haven't paid that much attention to it, or is this something that Apple added in El Capitan (I'm running OS X 10.11 Build 15A262E) or what else could it be?



      Also when I run login <myusername> then I run exit I do not get this odd output. It only seems to be when closing out of terminal.



      Note: I have replaced /Users/myusername with ~/ instead. I have also removed my .bash_profile to make sure it wasn't that.







      macos terminal virus






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 21 '15 at 17:26









      Moab

      51.5k1494161




      51.5k1494161










      asked Sep 20 '15 at 17:38









      iProgramiProgram

      2802418




      2802418






















          4 Answers
          4






          active

          oldest

          votes


















          22














          This seems to be a change to Bash Session in OS X El Capitan. See Bash sessions



          Also see this question in SE.






          share|improve this answer





















          • 1





            Ah, Thanks for that! Glad to know it is an OS based thing!

            – iProgram
            Sep 20 '15 at 20:26






          • 10





            Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

            – Daniel B
            Sep 20 '15 at 20:36



















          1














          had the same problem.
          Under terminal preferences->profiles -> shell. Select appropriate action to perform under "when the shell exits" menu.
          Fixed my issue.






          share|improve this answer
























          • To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

            – sharshi
            Feb 23 '18 at 18:27



















          0














          You can add an alias to your shell-profile (like .bashrc) such as:



          alias off='exit 0 >/dev/null'



          When you use 'off', it exits with those extra messages discarded.



          All you get is the 'logout' line, sent to 2>/dev.tty






          share|improve this answer































            0














            The last line of /etc/bashrc on the mac reads:



            [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"



            So to disable all the craziness in the Apple Terminal on exit:



            sudo mv /etc/bashrc_Apple_Terminal /etc/bashrc_Apple_Terminal-disabled






            share|improve this answer
























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              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%2fsuperuser.com%2fquestions%2f975678%2fstrange-output-from-terminal-exit-command-is-this-a-virus%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              22














              This seems to be a change to Bash Session in OS X El Capitan. See Bash sessions



              Also see this question in SE.






              share|improve this answer





















              • 1





                Ah, Thanks for that! Glad to know it is an OS based thing!

                – iProgram
                Sep 20 '15 at 20:26






              • 10





                Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

                – Daniel B
                Sep 20 '15 at 20:36
















              22














              This seems to be a change to Bash Session in OS X El Capitan. See Bash sessions



              Also see this question in SE.






              share|improve this answer





















              • 1





                Ah, Thanks for that! Glad to know it is an OS based thing!

                – iProgram
                Sep 20 '15 at 20:26






              • 10





                Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

                – Daniel B
                Sep 20 '15 at 20:36














              22












              22








              22







              This seems to be a change to Bash Session in OS X El Capitan. See Bash sessions



              Also see this question in SE.






              share|improve this answer















              This seems to be a change to Bash Session in OS X El Capitan. See Bash sessions



              Also see this question in SE.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 23 '17 at 12:41









              Community

              1




              1










              answered Sep 20 '15 at 20:25









              NZDNZD

              1,979916




              1,979916








              • 1





                Ah, Thanks for that! Glad to know it is an OS based thing!

                – iProgram
                Sep 20 '15 at 20:26






              • 10





                Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

                – Daniel B
                Sep 20 '15 at 20:36














              • 1





                Ah, Thanks for that! Glad to know it is an OS based thing!

                – iProgram
                Sep 20 '15 at 20:26






              • 10





                Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

                – Daniel B
                Sep 20 '15 at 20:36








              1




              1





              Ah, Thanks for that! Glad to know it is an OS based thing!

              – iProgram
              Sep 20 '15 at 20:26





              Ah, Thanks for that! Glad to know it is an OS based thing!

              – iProgram
              Sep 20 '15 at 20:26




              10




              10





              Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

              – Daniel B
              Sep 20 '15 at 20:36





              Please include all relevant details from pages you’re referring to. They might go away, making your answer incomplete.

              – Daniel B
              Sep 20 '15 at 20:36













              1














              had the same problem.
              Under terminal preferences->profiles -> shell. Select appropriate action to perform under "when the shell exits" menu.
              Fixed my issue.






              share|improve this answer
























              • To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

                – sharshi
                Feb 23 '18 at 18:27
















              1














              had the same problem.
              Under terminal preferences->profiles -> shell. Select appropriate action to perform under "when the shell exits" menu.
              Fixed my issue.






              share|improve this answer
























              • To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

                – sharshi
                Feb 23 '18 at 18:27














              1












              1








              1







              had the same problem.
              Under terminal preferences->profiles -> shell. Select appropriate action to perform under "when the shell exits" menu.
              Fixed my issue.






              share|improve this answer













              had the same problem.
              Under terminal preferences->profiles -> shell. Select appropriate action to perform under "when the shell exits" menu.
              Fixed my issue.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jan 9 '18 at 23:41









              Richard UbaRichard Uba

              111




              111













              • To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

                – sharshi
                Feb 23 '18 at 18:27



















              • To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

                – sharshi
                Feb 23 '18 at 18:27

















              To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

              – sharshi
              Feb 23 '18 at 18:27





              To just ignore the message and just exit the Terminal, under "When the steel exits:" select "Close if the shell exited cleanly".

              – sharshi
              Feb 23 '18 at 18:27











              0














              You can add an alias to your shell-profile (like .bashrc) such as:



              alias off='exit 0 >/dev/null'



              When you use 'off', it exits with those extra messages discarded.



              All you get is the 'logout' line, sent to 2>/dev.tty






              share|improve this answer




























                0














                You can add an alias to your shell-profile (like .bashrc) such as:



                alias off='exit 0 >/dev/null'



                When you use 'off', it exits with those extra messages discarded.



                All you get is the 'logout' line, sent to 2>/dev.tty






                share|improve this answer


























                  0












                  0








                  0







                  You can add an alias to your shell-profile (like .bashrc) such as:



                  alias off='exit 0 >/dev/null'



                  When you use 'off', it exits with those extra messages discarded.



                  All you get is the 'logout' line, sent to 2>/dev.tty






                  share|improve this answer













                  You can add an alias to your shell-profile (like .bashrc) such as:



                  alias off='exit 0 >/dev/null'



                  When you use 'off', it exits with those extra messages discarded.



                  All you get is the 'logout' line, sent to 2>/dev.tty







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 12 '18 at 0:05









                  Dick.GuertinDick.Guertin

                  345




                  345























                      0














                      The last line of /etc/bashrc on the mac reads:



                      [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"



                      So to disable all the craziness in the Apple Terminal on exit:



                      sudo mv /etc/bashrc_Apple_Terminal /etc/bashrc_Apple_Terminal-disabled






                      share|improve this answer




























                        0














                        The last line of /etc/bashrc on the mac reads:



                        [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"



                        So to disable all the craziness in the Apple Terminal on exit:



                        sudo mv /etc/bashrc_Apple_Terminal /etc/bashrc_Apple_Terminal-disabled






                        share|improve this answer


























                          0












                          0








                          0







                          The last line of /etc/bashrc on the mac reads:



                          [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"



                          So to disable all the craziness in the Apple Terminal on exit:



                          sudo mv /etc/bashrc_Apple_Terminal /etc/bashrc_Apple_Terminal-disabled






                          share|improve this answer













                          The last line of /etc/bashrc on the mac reads:



                          [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"



                          So to disable all the craziness in the Apple Terminal on exit:



                          sudo mv /etc/bashrc_Apple_Terminal /etc/bashrc_Apple_Terminal-disabled







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 31 at 18:27









                          Brad AllisonBrad Allison

                          112




                          112






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • 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%2fsuperuser.com%2fquestions%2f975678%2fstrange-output-from-terminal-exit-command-is-this-a-virus%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

                              Plaza Victoria

                              In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                              How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...