Skip to content

Instantly share code, notes, and snippets.

@dotherightthing
Last active August 15, 2019 09:11
Show Gist options
  • Save dotherightthing/87c64e52983b08403ecab61c47cf344d to your computer and use it in GitHub Desktop.
Save dotherightthing/87c64e52983b08403ecab61c47cf344d to your computer and use it in GitHub Desktop.
[Disabling .DS_Store] #macos

Disabling .DS_Store

Created: 2017.04.14

MacOS creates .ds_store files to store meta data about folders.

The preceding dot causes DS_Store files to be hidden from the user, even after showing hidden files.

However these files are flagged by the WordPress Theme Check plugin:

Hidden file error.

Disable the creation of .DS_Store files

  1. defaults write com.apple.desktopservices DSDontWriteNetworkStores true
  2. Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch.

Remove existing .DS_Store files

  1. Navigate to the offending directory
  2. rm -f .DS_Store
  3. Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch (or you may have to restart the computer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment