Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Yesterday i tried to change the `/usr` folder with an old one saved in Time Machine,

I type this in the terminal (to keep a copy of /usr folder) :

# mv /usr /usr-copy

After that nothing work, I decided to reboot (and I've forgotten to rename the /usr-copy in /usr, I was tired), so now there's is no /usr folder at all!

I have this message on each reboot :

You need to restart yout computer. 
Hold down the Power button until it turns off, then press the Power button again

I cannot access to any other things like a menu... just the message reboot and hold f11 doesn't work.

Is there a way to access the terminal, where I can type "# mv /usr-copy /usr" ?

share|improve this question

migrated from Aug 17 '10 at 14:43

This question came from our site for professional and enthusiast programmers.

This is really a question for or – Benjamin Anderson Aug 17 '10 at 14:37
Where did you expect the mv command to be? Anyway, belong on – klez Aug 17 '10 at 14:38
I did something like that once - fortunately it was in installation, so I just blew away what I'd done and reinstalled. – David Thornley Aug 17 '10 at 14:40
@Benjamin - Definitely superuser. This is not a question for serverfault (Or Stackoverflow). – Kevin Vermeer Aug 17 '10 at 14:41
Holy crap, what were you thinking? – Paul Tomblin Aug 17 '10 at 14:55

You can boot from your install disk. When you boot from the disk, you will be asked to choose your language.

After choosing your language, a desktop will appear and the "Utilities" item in the menu bar will contain an entry for the Terminal.

Use this menu start the Terminal app and move, rename, or replace the missing directories.

share|improve this answer
Clarification: once you're past the initial choose language screen, the installer will have a Utilities menu with Terminal among the available choices. – Gordon Davisson Aug 17 '10 at 16:26

I would remove the harddrive and mount it in another machine, and rename the catalog, and then return the harddrive to your original machine.

share|improve this answer

Others have given good suggestions on how to actually boot the machine.

For future reference, if you, for some reason, do this again, (or if you actually DO want to swap the two /usr hierarchies... if you add /usr-cpy/bin to your path, you should still have access to all of your utilities...

share|improve this answer
This won't necessarily avoid trouble -- just because the temporary binaries directory is in your path doesn't mean the various background daemons that depend on it won't fail horribly... – Gordon Davisson Aug 17 '10 at 16:24

If removing the harddrive isn't an option, then consider restoring from your last time machine backup, and then redoing your changes when you aren't too tired.

Holding down the command key while booting alters the boot sequence - it may get you to where you need to be. There are other special-key-during-boot tricks too; I don't have them memorized.

share|improve this answer

Either use a rescue-DVD or something to move /usr back or reinstall OSX completely.

You should NEVER EVER mv /usr. Copy it if you need. For Unix a big portion of the binaries and stuff you need are in /usr, so if you mv it, you'll practically kill your OSX Installation.

share|improve this answer

Have you tried holding Command+S during start-up to enter the Single User mode, this could help especially because you don't seem to have an install disk?

share|improve this answer

You must log in to answer this question.