0

In Mac's terminal, while trying to delete an uncompressed file, I accidentally deleted most of my /usr/local/bin including bash. While searching for solutions to undo the damage, I found that most of the answers involved using bash. Is there a way to restore them without using bash or a place to download precompiled bash binaries?

10
  • 1
    Time Machine's good for that kind of thing; or Backblaze, or ...
    – Tetsujin
    May 5, 2019 at 7:18
  • @dsstorefile1 I don't think so. My computer has all kind of stuff installed and I don't want to waste them.
    – user963863
    May 5, 2019 at 15:32
  • @Tetsujin Excuse me, but sorry I don't have backup
    – user963863
    May 5, 2019 at 15:32
  • Then that will be your simplest recourse.
    – Tetsujin
    May 5, 2019 at 15:33
  • How did those files get into /usr/local/bin? Homebrew or Ports? I'd start there. Check that... I'd start by either getting an ext HD and scheduling Time Machine or even better paying for a service like Backblaze, then restoring your binaries via brew or ports.
    – MMB
    May 6, 2019 at 7:59

1 Answer 1

0

Turns out I was being stupid. The copy I had in /usr/local/bin was by homebrew, and my default shell was still protected in /bin. Yay!

If anyone finds themselves in a similar situation, then see if your precious shell is in /bin!

You must log in to answer this question.