0

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.

  • When you ran the command above do you remember which directory you were in inside Terminal? Were you sitting in the root directory? – Alistair McMillan Sep 14 '15 at 21:32
  • @AlistairMcMillan: i was under ~/Movies/... – Zaiborg Sep 14 '15 at 21:33
  • @Zaiborg Running your command as an admin just returns mv: rename . to _.: Invalid argument and mv: rename .. to _..: Invalid argument and renames .localized to _.localized. Did you prepend sudo by accident? – klanomath Sep 14 '15 at 21:43
  • @klanomath no i did not, i got the error that renaming . and .. is not allowed, the files in that directory were renamed correct – Zaiborg Sep 14 '15 at 21:44
1

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.

  • can you reproduce the error of applications not starting? – Zaiborg Sep 14 '15 at 22:11
  • @Zaiborg No absolutely not. Do you have any aliases in your bash profile files? – klanomath Sep 14 '15 at 22:13
  • / and ..../CoreServices shows no files starting with underscore – Zaiborg Sep 14 '15 at 22:13
  • i know some of those words but i've no idea what that should be – Zaiborg Sep 14 '15 at 22:14
  • do you know something about LSOpenURLsWithRole() failed with error -10810 – Zaiborg Sep 14 '15 at 22:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .