Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
Last login: Sun Dec 25 08:01:09 on ttys000
login: /bin/bash: No such file or directory

[Process completed]

I opened up my terminal this morning and saw the above message. Not sure how I can get my Mac terminal back?

I was writing a script to rm -rf /bin in my current directory, and I'm pretty sure it killed my system bin folder.

share|improve this question
    
The correct command would be rm -rf ~/bin. Notice the tilde before the /bin. –  DragonLord Dec 25 '11 at 16:02
4  
And that's why you don't run scripts, that only manipulate files you should be owning, as root. –  Daniel Beck Dec 25 '11 at 16:40

2 Answers 2

up vote 1 down vote accepted

This is what I got from a quick google search.

Booting From your CD/DVD Drive or External Hard Drive

Every new mac comes with a Boot CD or Boot DVD for re-installing the operating system (OS) at some time at which the initial install of the OS has reached its sell-by date. This CD is the easiest way to get the machine booted and in a state where you can run some basic tests and fixes using the Apple Disk Utility available as part of the install process.

I am going to make the assumption that you are unable to boot the Mac to a state where you can reach system preferences, so I will disregard the “Startup Disk” selector in a System Preferences as a means by which to select the CD as a boot disk! As an alternative, startup the Mac, as it whirs into action, slot the CD into the drive and then hold down the C key. This will force the Apple Mac to attempt to find a valid system folder on whatever media is contained int he CD/DVD drive and use it to boot the Mac.

share|improve this answer
1  
If you quote large parts from another site please at least include the link where it came from. –  slhck Dec 25 '11 at 17:22
    
True, added the link. –  jaypal singh Dec 25 '11 at 17:25

You have successfully deleted your /bin. You can try to copy that directory from another machine or usb stick with the finder (it's only about 40 files). Just don't work as root when trying such things out.

share|improve this answer
    
My computer no longer boots up unfortunately, so I can't copy those files over :( –  Sheehan Alam Dec 25 '11 at 16:29
    
@SheehanAlam Do you have your recovery DVDs or, if you're on Lion, just boot up with Command - R and recover your system. Or recover from your latest backup. –  slhck Dec 25 '11 at 16:39
    
I'm on snow leopard, have my DVD, but I can't seem to get it to boot. Tried holding down c, and option key neither work –  Sheehan Alam Dec 25 '11 at 16:40
    
You could try a live system to access your harddisk. Check puredarwin.org/developers/live-cd –  ott-- Dec 25 '11 at 20:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.