Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I was temporarily changing the name of a folder before moving it. The name I randomly chose was "._". The folder immediately disappeared and Finder would not allow me to undo the operation. (I know; bad convention, but it was going to be temporary, so didn't think it would be an issue.)

*** NOTE: Viewing invisible files/folders was already turned on before this incident. *** (I can still see hidden files except THIS one.)

Looking through Finder, the folder was no longer visible. It was also not indexable (of course) by Spotlight Search.

So, two questions...

  1. Primarily, "How do I get it back?"
  2. Why did this happen? Is "._" a reserved system name? Is this repeatable?

UPDATE: Language addressing $ cd into the wrong working directory was removed from OP to reduce ambiguity and verbosity. Corrected solution moved to answer section.

share|improve this question
1  
Suggest using tab completion; perhaps you have an invisible character in or at the end of the folder name. –  Andrew Lazarus Jun 18 '13 at 6:46

2 Answers 2

All files and directories starting with . are Finder hidden files. System reserved dot directories are . for current directory and .. for parent directory. This is carried on from OS X Unix heritage.

For your file, there is a chance that you have an extra space after the _ or some unprintable character. Try mv ._ then hit TAB to find out if it will perform a completion on the name. If it does then continue typing the new name you desire. Note that you might need to hit TAB twice or more until you get that particular file name displayed in case you had other files that start with ._ in that directory.

Note that files and directories starting with . can be viewed in Finder upon desire and that you can search for on ASK DIFFERENT. They are called hidden files.

share|improve this answer
    
Thanks, ismail. Very good suggestion. Also note that the OP actually had hidden files visible. ;) –  Old McStopher Jun 18 '13 at 7:27
    
Sorry. I should have read the question more carefully. Did the <kbd>TAB</kbd> solve the problem? If not, can you move into that directory in the Terminal? –  ismail Jun 18 '13 at 15:50
    
Great feature to highlight! Turns out there was no invisible character, though. Indeed I can nav to it, rename it, etc. See my updated solution moved to the answer section. (I was in the wrong working directory in my previous attempt.) –  Old McStopher Jun 18 '13 at 20:44
up vote 2 down vote accepted

How to Get it Back

  1. Open Terminal
  2. Navigate to folder containing missing "._" file/folder.
  3. Run $ ls -a to confirm existence of "._".
  4. Rename $ mv ._ ._something_else
  5. VOILA! Confirm that ._something_else is visible in finder.*

Is this anomoly repeatable?

Yes.

  1. Create a new file named "._".

    $ touch ._ (Or create a new folder with this name in Finder.)

  2. Confirm the file/folder is visible in Terminal.

    $ ls -a

  3. See that the file/folder is NOT visible in Finder.*


*Again, remember, in this case, hidden files had already been made visible before the situation occurred.

$ defaults write com.apple.finder showHiddenFiles TRUE
$ killall Finder
share|improve this answer
    
Instead of an answer, update your question with the correct info. –  james.garriss Jun 18 '13 at 17:00
    
Good point to avoid ambiguity. I will remove the "broken" language from the OP. However, since questions are not answers, the fixed answer language will remain here. –  Old McStopher Jun 18 '13 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.