So What Is That .DS_Store File Anyway?

Photo by Alexander Shatov on Unsplash

I’ve got the answer to your burning question. It was actually an issue for me because it kept throwing the count off in my metadata folder for an NFT project. So I did some research on it and wanted to share what I found.

The .DS_Store file, which stands for Desktop Services Store is an invisible file that gets automatically created anytime you open a folder with Finder on the macOS. This file will then follow the folder everywhere it goes, including when it is compressed in a ZIP file.

The .DS_Store file stores the metadata of its containing folder and also the names of other files in the directory. If accidentally shared, you may be exposing private files to be viewed by an outside party.

There are a few ways you can prevent this. The first would be to go into the folder containing the .DS_Store file, open Terminal inside of that folder and execute this command:

rm .DS_Store

You can completely disable the creation of these files by opening Terminal again, and entering:

write com.apple.desktopservices DSDontWriteNetworkStores true

Then restart your computer.

I hope this was helpful!

Source: https://buildthis.com/ds_store-files-and-why-you-should-know-about-them/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
TechJD

Law, programming, and everything in-between! Coming up with fun coding projects with real-world application.