Skip to content

Instantly share code, notes, and snippets.

@premitheme
Last active May 2, 2018 06:18
Show Gist options
  • Save premitheme/757ed2a139c482f2838ab7f6957e9d62 to your computer and use it in GitHub Desktop.
Save premitheme/757ed2a139c482f2838ab7f6957e9d62 to your computer and use it in GitHub Desktop.
Restore Finder's folder view options on OS X

Restore macOS Finder's folder view options

  1. Open the Terminal then type sudo find followed by a single space.

  2. Drag your starting folder from any Finder window to the Terminal window (or use a forward slash "/" to indicate the system root for the whole system. Takes too much time. Not recommended).

  3. Type -name followed by a space and then the file name pattern you would like to search for .DS_Store.

  4. Type -delete to have the command delete files.

  5. To refresh Finder windows finish the first command with ; followed by a space, then type killall Finder.

When you are done, the command should look something like the following:

sudo find [folder path] -name .DS_Store -delete; killall Finder

Now hit Enter/Return, you will be prompted for your password. You won't see your password as you type, so type carefully and hit Enter/Return again and waint untill the process finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment