MacOS – Unable to start any application

applicationscrashmacosterminal

Today I tried to rename a few hidden files with the following command in terminal (might be a hint for the solution):

for f in .*; do mv "$f" "_$f"; done

Now I wanted to start vlc and all I got was the messagebox to ignore, report or relaunch.
Most application are not startable, except the few that are loaded (with the dot mark in the dock under the icon).

Non-startable applications:

Messages
App Store
Mail
Calendar
iTunes
Terminal
Notes
Chrome
Safari
VLC
Console
Boot Camp Assistant

Startable applications:

X11
QtCreator
JDownloader
Grapher
Disk Utility

In addition, the attempt to run Mail from XTerm resulted in LSOpenURLsWithRole() failed for the application /Applications/Mail.app with error -10810.

My system is a MacBook running Yosemite 10.10.5.

My guess is that I for some reason renamed system files and I am afraid that after reboot the system won't start.

Best Answer

It looks like a coincidence to me.

Only the files and folder in ~/Movies should be affected.

Even running the command with sudo in the root of my drive doesn't render my system unbootable:

for f in .*; do sudo mv "$f" "_$f"; done

Some files and folders are renamed (e.g. _.fseventsd, _.Spotlight-V100, _.Trashes, _.DocumentRevisions-V100, _.vol) but after a restart the important ones will be recreated with the proper name (leaving the renamed folders as they were).

Navigate with Terminal to / and /System/Library/CoreServices and check if anything was renamed; if not reboot otherwise remove all the underscores.