0

I was installing ruby/rails/gem and homebrew and got frustrated. I think I deleted the stty folder. ANYWAY, what can I do? It doesn't seem to have ever happened on the internet before.

Running stty comes back with command not found...

james2doyle
  • 1,399
  • 19
  • 21

2 Answers2

2

The stty command can't be easily deleted; you'd have to be running with administrator privileges. It is supposed to be located in /bin/stty (try ls /bin/stty to make sure it's still there).

My guess is that you altered your shell's $PATH variable (which is a colon-separated list of directories that the shell searches for commands when you run them only by name).

Try this to see your current path: echo $PATH.

Then make sure that :/bin appears somewhere in that value, e.g.

export PATH=${PATH}:/bin

To fix this permanently, make sure that PATH is set in a shell startup file, e.g. .bashrc in your home directory.

Kevin Grant
  • 5,363
  • 1
  • 21
  • 24
  • I did check with ls. I get: ls: /bin/stty: No such file or directory – james2doyle Aug 29 '12 at 15:53
  • It's been deleted, then. If you have Time Machine on, you can access your backup disk from the terminal (a disk under /Volumes) and look for a copy of the deleted files. Or use the recovery partition to see if the files are there. If those backups don't exist you may need to reinstall the OS to repair /bin. – Kevin Grant Aug 29 '12 at 19:03
0

I copied the stty from a friends mac. It seems to be working fine. I have run a few commands and there have been no issues yet.

james2doyle
  • 1,399
  • 19
  • 21