Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Super Spartan

macrumors 6502a
Original poster
Mar 10, 2018
631
272
Dubai
I had my external HDD connected to my MBP and used it for a while. When I connected it to my Windows laptop, I found that there is a 4KB file of every file in there with a ._ prefix.

I deleted them all but is there a way to prevent this from happening?
 
  • Like
Reactions: w1z
No. They are meta files that are produced automatically. You can hide them in Windows with key bindings or other means.
 
  • Like
Reactions: Peadogie
you can disable them, sure

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

but beware, those files on macOS are used to store the metadata associated with each folder, like the size and orientation of icons, background images, and so on.
 
you can disable them, sure

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

This command only disables DS_store files, not the other meta ._* files.

I use BlueHarvest to clean certain ejectable drives.

I'll have to give blueharvest a try though.
 
  • Like
Reactions: Super Spartan
I never saw other types though..
I'm not 100% sure on this, but I believe the additional files only show up on drives/network shares that don't support MacOS extended attributes. The OP is probably using an NTFS or other non-hfs+/apfs formatted drive to use with windows. I see them all the time on network shares at work.

For anyone reading this thread due to ._* on network shares, you can also edit your /etc/nsmb.conf to "veto" files with that prefix. This will stop them from appearing on YOUR Mac in Finder. Maybe there's a comparable SMB setting file in windows.
 
I'm not 100% sure on this, but I believe the additional files only show up on drives/network shares that don't support MacOS extended attributes. The OP is probably using an NTFS or other non-hfs+/apfs formatted drive to use with windows. I see them all the time on network shares at work.

For anyone reading this thread due to ._* on network shares, you can also edit your /etc/nsmb.conf to "veto" files with that prefix. This will stop them from appearing on YOUR Mac in Finder. Maybe there's a comparable SMB setting file in windows.
The drive in question is a Western Digital My Passport formatted in exFAT


I do have NTFS for Mac by Paragon Software installed though could that be the reason?
 
It's nothing to do with NTFS; I see the same with an ExFAT drive and I don't have any NTFS software. When I plug the drive into my Blu-ray player, I have to scroll through dozens of these ._ files before I get to the actual movies. It's annoying.
 
The drive in question is a Western Digital My Passport formatted in exFAT

I do have NTFS for Mac by Paragon Software installed though could that be the reason?
No, these are resource fork files Finder creates on non-Apple filesystem disks. Normal Unix-based OS hides any file with period as first character. Resource fork has not been used even by Apple for quite some time if I am not mistaken.
Why do I prefer the CleanMyDrive? Because it removes all those files automatically when I eject the disc.
 

Attachments

  • Screenshot 2019-11-22 at 08.24.33.png
    Screenshot 2019-11-22 at 08.24.33.png
    179.1 KB · Views: 321
  • Like
Reactions: Super Spartan
I deleted them all but is there a way to prevent this from happening?

Better not to delete them - they are useful when the drive is connected to macOS.

The Apple (macOS and iOS) virtual filing system (which sits above the disk format) includes various file metadata in addition to the true content of the file. This metadata includes (as others have said) stuff which is valuable to a macOS system. From the user perspective this includes (amongst other things) finder tags and from the system perspective it includes security information. This is stored as extended attributes.

When the virtual filing system interacts with the actual disk driver, it expects the disk filing system to make an attempt to maintain the extra metadata or extended attributes. HFS/APFS store this metadata as part of the disk file system. But other disk formats, like FAT, store the metadata in the ._ files.

You can delete them if you like, but they will reappear next time the files are modified on macOS. Better to make the other operating system hide the files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.