My friend deleted some hidden files on his Mac (OS X 10.9.4) laptop.
After restarting his laptop the Mac just shows loading progress bar and nothing else.
How can we restore the hidden files and get the computer working again?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
They're hidden for a reason, & that reason is because you shouldn't go anywhere near them if you don't know what you're doing.
To repair the installation…
At Boot, hold Cmd ⌘ R & go to Recovery, or Internet Recovery if that doesn't work.
See About OS X Recovery
OS X Recovery includes a built in set of utilities as part of the Recovery System.
You can use OS X Recovery to do the following:
I would suggest you should attempt in that order, probably ignoring 'verify & repair' as you know exactly why the files are no longer there.
To recover invisible files from Time Machine, you would first need to set the Finder to 'show invisibles' which can be done from Terminal or by Applescript - though I'm not certain how you would do that from the recovery startup.
Failing that, the only option would be to reinstall OS X, either from the Recovery partition or via Internet Recovery - this will replace only the System files, your data will not be affected.
I did the same while trying to back up my files. I accidentally erased all files as I thought I was only deleting "my files" after copying them on my external drive. I tried the Cmd+R but it didn't work.
I tried restarting with the OS X installation CD, then it booted normally. I never had to do a reinstall.