Copy system bundle to a Mac on network

copy/pastefilesystemterminal

I screwed up while using Monolingual and removed the "AppleKeyboardLayouts.bundle". Before I realized what happened, I logged out and now I can't type a password to log back in.

I have tried to copy the bundle to the right location, using Sharing but I get "not enough write permissions." I tried using scp in Terminal but I get "no such file" on all the bundle contents.

What is the best way to copy a bundle to one of the System folders /Systems/Library/Keyboard Layouts/ from one Mac to another over the network?

I know that I can probably restore from a boot disk but I'd prefer to just do it this way if possible.

Help! Thanks.

Best Answer

To copy your "AppleKeyboardLayouts.bundle" to a system folder you need "root permission!" use cp (copy) or mv (move) with sudo (super user) to copy files.

If you let's say try to copy folders or files that have a recursive structure/architecture you need to add the -r flag, like so: cp -r ~/Desktop/myFolderA ..

sudo cp ~/yourPath/AppleKeyboardLayouts.bundle /Systems/Library/Keyboard\ Layouts/

It is always a good idea imho, to have a second partition ready on the same HDD in order to copy files back and forth, if needed, or at least to have a second user account with sufficient permissions.