MacOS – accidentally deleted /var folder

macmacbook promacos

I accidentally moved my /var folder to trash and now unable to login to mac. The only solution I found until now it to recover OS X.

I have tried to move /var back to /private folder in single user mod, since it is Read-only and not allowing me to perform this action.

Is there any way I can move /var folder back without re-installing OS X. I am having Mavericks as OS.

Best Answer

When in single user mode you must enter the command at the begininng to make it writeable.

/sbin/mount -uw /

Then move the /var folder back to /private

mv /Path/To/var /private/