Extra ._ files on ROCK internal storage

I have just set up ROCK on a NUC. I’m very pleased!

I copied all my music from external HDD to an internal SSD drive. I’ve started looking into backing up this internal drive to (among other) the external HDD (for the time being using FreeFileSync on my Macbook).

I now see lots of new invisible files on the internal storage beginning with ._ (eg “._01 - Track01.flac”), all of them 4.096 bytes. What are those files? They were not on the external HDD when I used this with Roon Core running on my Macbook.

These are hidden MacOS files that would have been present on your MacBook. They do no harm and consume very little space.

You can remove the files if you like using your MacBook.

sudo mkdir /Volumes/smb
mount_smbfs //<ROCK IP>/<share name> /Volumes/smb
sudo find /Volumes/smb -name '._*' -type f -delete

This may take some time if you have many folders.

Please note that the delete command is irreversible so make sure you have a backup of the share before doing this. You have been. warned!

Thank you. But why did MacOS not make these files when I had Roon Core running on my MacBook and my music on the external USB HDD?

The ._ files are only made alongside those audio files (formats) that Roon recognize, which made med believe that it was the Roon (ROCK) that made the invisible files.

They’re only created on non-mac formatted volumes, which includes smb shares like Rock. Have a look at BlueHarvest which is a great way to automatically take care of it (including for network shares).

A little history from Apple Support:

Before Mac OS X, the Mac OS used ‘forked’ files, which have two components: a data fork and a resource fork. The Mac OS Standard (HFS) and Mac OS Extended (HFS Plus) disk formats support forked files. When you move these types of files to other disk formats, the resource fork can be lost.

With Mac OS X, there is a mechanism called “Apple Double” that allows the system to work with disk formats that do not have a forked file feature, such as remote NFS, SMB, WebDAV directories, or local UFS volumes. Apple Double does this by converting the file into two separate files. The first new file keeps the original name and contains the data fork of the original file. The second new file has the name of the original file prefixed by a "._ " and contains the resource fork of the original file. If you see both files, the ._ file can be safely ignored. Sometimes when deleting a file, the ._ component will not be deleted. If this occurs you can safely delete the ._ file.

1 Like

Okay - thank you. That explains why I see the file on the ROCK internal storage.

I cannot say that I fully understand the purpose of the ._ files. What happens if I delete all of them? Should I just keep them as they are?

Or just live with them … the can coexist with Roon.

I’m trying to avoid things that drives me mad, so I’ll just leave them.
Now I understand why they are there. Thanks for explaining.

I have the same thing as the original poster, but the files are only on the Nucleus (left) — they’re not on my MBP (right):

Not the end of the world, of course, but it’d be good to know why they were created in the first place, so that people (perhaps just me :)) don’t need to do things like exclude certain patterns in filenames ("._")
in programs like Beyond Compare so that I know my local music folders are identical to the ones on the Roon Core.

Is the Nucleus creating them because the filesystems are different, perhaps (APFS vs. whatever the Nucleus uses)?

No, the Mac is creating them. In the old days, mac files had data and resource forks which are not needed or supported on other files systems. So the resource fork gets saved as a dot file when copying to a non mac file system. Today its of little to no use. I recommend Blueharvest which takes care of this very well, and automatically Their website also has a far better technical description than I’ve just given. The .DSstore files just contain things like icon position, and are used by the mac finder.

Ah, gotcha. The Mac is creating them as it copies, rather than them being there beforehand.

Second time I’ve had Blueharvest recommended in as many days. Off I go :slight_smile:

There’s really no need to be concerned about these files. They are hidden files–starting with a dot–and take no appreciable space.

However, if you do want to be rid, there is a simpler method of preventing them on file shares. From the Mac terminal type:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true