Since upgrading to Yosemite, there seems to be an extra class of hidden files that are 'more hidden'. They are visible when I run ls
, but not in my Finder (even though regular hidden files are visible on my machine).
For example, I can see .DS_Store
in Finder, but then when I run ls
in my terminal I can see extra versions:
.DS_Store
._.DS_Store.4ohM2f
._.DS_Store.b03KXd
._.DS_Store.zFFTiN
I suspect they might be some kind of revision history being saved for Time Machine, but I haven't set up Time Machine on my computer.
What are they and how do I get rid of them?
Best Answer
I will offer one example involving files with the prefix
._
.I have two volumes named Steelhead2 and Shark3. The volume named
Steelhead
is hfs+ formatted and the volume namedShark3
is ExFAT formatted. Consider the fileiprogram.txt
which has extended attributes. I can display these attributes using thels
command as shown below.Using the Finder, I copy this file to an empty folder named
dots
onShark3
. Again using thels
command I get the following.Partitions formatted ExFat can not have extended attributes. So OS X created the file
._iprogram.txt
to contain these attributes. Next, I create a new folder nameddots
onSteelhead2
and use the Finder to copy justiprogram.txt
to this folder. Usingls
, I get the following.Since
Steelhead2
is hfs+ formatted, there is no need for a._iprogram.txt
file. Finally, returning to the folder/Volumes/Shark3/dots
, I will remove the file._iprogram.txt
and enter the 'ls' command, as shown below.The extended attributes are gone.
You are correct, these
._
prefixed files are hidden in the Finder. Even if you usedefaults write com.apple.finder AppleShowAllFiles TRUE
, these files remain hidden.If you find
._
files in your hfs+ formatted partitions, some operation did not get synchronized property. Try using the commanddot_clean
to remove these '._' files. For more information either enterman dot_clean
or see dot_clean -- Merge ._* files with corresponding native files.