ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Why Does BASH on Mac OSX Rarely Save to History

    IT Discussion
    mac osx 10.10 bash unix mac osx
    7
    38
    9.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by scottalanmiller

      I find it very frustrating working with Apple Mac OSX for anything on the command line because extremely often what I am working on never gets saved to the command history. So if I go to repeat a command, look up what I have done, etc. it is not saved. Whole categories of things that I work on don't go into the history at all. I know that this Mac has been unreliable and has all kinds of stability issues (but generally not the terminal) but this seems very basic and rather extreme so I am guessing that something is wrong. The command history is full of details, but it is anything but complete.

      Is there someway to manage this behaviour to have it work reliably and consistently like CentOS, for example?

      1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch
        last edited by

        I have none of the problems you have, with my MacBook Pro.

        So claiming that Macs are "generally unreliable and have all kinds of stability issues" is simply your specific experience. Yes, possibly also that of some people you know, but that makes it far from "generally."

        My experience has been completely the opposite as well as more than one person who has posted in your threads on the subject here in the past.

        Stick to facts and not conjecture.

        Specific to your complaint about bash, I can open a terminal and hit the up arrow and go back through everything I have done for more history than I even recall using it for until I see the commands again.

        In fact I used mine today in order to get the screen command to connect to a ERL via USB console cable. I had thought it was one of the last things I had done. But it was not as I had forgotten about a bunch of SSH stuff I had done last week.

        scottalanmillerS 4 Replies Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @JaredBusch
          last edited by

          @JaredBusch said:

          I have none of the problems you have, with my MacBook Pro.

          Mine crashes a few time a day.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @JaredBusch
            last edited by

            @JaredBusch said:

            Specific to your complaint about bash, I can open a terminal and hit the up arrow and go back through everything I have done for more history than I even recall using it for until I see the commands again.

            This is completely lacking here. I can see a lot of history but tons of it is missing. Some commands appear to be always missing, specifically Chef Knife commands. I've never once issued a system build command and had it available in the command history once the shell restarts. Not once. It might be completely coincidence but that one command I've noticed is 100% missing from the history over more than a month of testing.

            It is extremely strange to see it recording sporadically and not all or nothing.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @JaredBusch
              last edited by

              @JaredBusch said:

              In fact I used mine today in order to get the screen command to connect to a ERL via USB console cable. I had thought it was one of the last things I had done. But it was not as I had forgotten about a bunch of SSH stuff I had done last week.

              I can see stuff much older in there, it's a very recent command that I was looking for and I've been keeping an eye on this as it seems to happen so often. There are tons of times that I don't go looking for old commands so it is hard to say how often it happens. But I know that certain complex commands appear to never be stored at all.

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                And I've resorted to directly quierying the history rather than working through the shell itself too, to see if that changed anything but it is just not in there.

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @JaredBusch
                  last edited by

                  @JaredBusch said:

                  Stick to facts and not conjecture.

                  Fair enough, I reworded.

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    I should point out, now that I think about it, that recalling the commands using the "up arrow" even when I just used it does not work consistently either. It will randomly (as far as I can tell) recall different versions of the commands, including ones I have not run. So I have the issue when I go to run a command twice in a row, I have to check it very carefully because it does not come back up the same always, even when it was the very last command.

                    1 Reply Last reply Reply Quote 0
                    • stacksofplatesS
                      stacksofplates
                      last edited by stacksofplates

                      Does Mac have something like psacct? I thought I read somewhere that it had accton and you could run lastcomm.

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @stacksofplates
                        last edited by

                        @johnhooks said:

                        Does Mac have something like psacct? I thought I read somewhere that it had accton and you could run lastcomm.

                        I tried lastcomm, but no luck. Does not appear to be available.

                        stacksofplatesS 1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates @scottalanmiller
                          last edited by

                          @scottalanmiller said:

                          @johnhooks said:

                          Does Mac have something like psacct? I thought I read somewhere that it had accton and you could run lastcomm.

                          I tried lastcomm, but no luck. Does not appear to be available.

                          Oh, sorry. I have almost zero Mac experience. I never wanted to shell out the money for one. I'll look around though.

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            Yeah, this is my first one in a very long time and I'm constantly frustrated with things not working, crashes, things that I'm just confused by or whatever.

                            I timed the boot time on this yesterday.... 14 seconds from power on to password, 28 seconds from password to second password (why does it always need that twice) and another 14 seconds from second password to usable desktop. I can't remember anything booting that slowly since we were using spinning disks on Windows XP and even then I feel like it was comparable or better plus never required that I log in twice.

                            1 Reply Last reply Reply Quote 1
                            • scottalanmillerS
                              scottalanmiller
                              last edited by

                              My machine crashed overnight last night. No idea why. There has to be something wrong with it.

                              1 Reply Last reply Reply Quote 1
                              • stacksofplatesS
                                stacksofplates
                                last edited by

                                That sucks. If it makes you feel any better my Fedora 22 boots in about three seconds (after the bios screen).

                                1 Reply Last reply Reply Quote 1
                                • scottalanmillerS
                                  scottalanmiller
                                  last edited by

                                  That's more of what I am used to. Even brand new out of the box this thing booted roughly the same as it does now. Nothing has noticeably changed. The double logins were always needed (I suspect that it crashes after the first boot and boots again, but there is no way to tell and this is how it has always worked and it never tells me there was a crash, just seems to do everything twice.) I can't tell that it takes any longer than when it was fresh from the box.

                                  1 Reply Last reply Reply Quote 1
                                  • stacksofplatesS
                                    stacksofplates
                                    last edited by

                                    This any help?
                                    https://discussions.apple.com/thread/3922262

                                    1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller
                                      last edited by

                                      Sadly no, I get most history, just not all. So can't be permissions. Very different than his issue of no history whatsoever.

                                      dafyreD 1 Reply Last reply Reply Quote 0
                                      • dafyreD
                                        dafyre @scottalanmiller
                                        last edited by

                                        @scottalanmiller As much of a problem that OS X has given you, I shudder to think: Have you tried Windows 10 or $favoriteLinuxDistro to see if the system runs better under another OS? If not, then it may actually be hardware problems.

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @dafyre
                                          last edited by

                                          @dafyre said:

                                          @scottalanmiller As much of a problem that OS X has given you, I shudder to think: Have you tried Windows 10 or $favoriteLinuxDistro to see if the system runs better under another OS? If not, then it may actually be hardware problems.

                                          I can't practically replace the OS on the hardware. That would be nice. A potential alternative is to run Linux in a VM which, from my testing, is completely stable and normal (within the confines of the overall OS staying up and running.)

                                          1 Reply Last reply Reply Quote 0
                                          • s.hacklemanS
                                            s.hackleman
                                            last edited by

                                            If it is crashing that often you may have something else wrong. I haven't had mine crash in months, but I have a mac pro server that isn't waking up from sleep with out being unplugged for 10 seconds. It only happens about once every other week. Called Apple, they did a online log dump, couldn't find anything but kept putting pressure on them. They agreed to let me bring it into a Apple store for more diagnostics and have told me if they can't figure it out, they will replace it for free.

                                            If I was you I would start keeping a log of system crashes for about a week, then call and start hounding on support because what you are experiencing is not normal. The plus side is Apple stands behind their hardware and their OS so as long as you are still under warrantee, they will cover both.

                                            scottalanmillerS 2 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post