Forrest logo
back to the dot_clean tool

dot_clean:tldr:92a93

dot_clean: Merge and delete all `._*` files.
$ dot_clean -m ${path-to-directory}
try on your machine

This command is a command-line utility used in macOS to clean up the .DS_Store files, desktop.ini files, and other metadata files that are automatically created by the operating system in directories that are stored on non-native file systems, such as network drives or external storage devices.

Here is a breakdown of the command and its components:

  • dot_clean: This is the actual command that instructs macOS to run the dot_clean utility.
  • -m: This is an optional flag that can be used with the dot_clean command. It stands for "merge". When used, dot_clean will merge the found metadata with the existing files instead of deleting them. This can be useful if you want to preserve any existing metadata.
  • ${path-to-directory}: This is a placeholder that represents the path to the directory where you want to clean up the metadata files. You need to replace it with the actual path to the directory you want to clean.

For example, if you want to clean up the metadata files in a directory located at "/Users/username/Documents", you would use the following command:

dot_clean -m /Users/username/Documents

Once you execute the command, dot_clean will search for any metadata files in the specified directory and its subdirectories, and either delete them or merge them with the existing files, depending on whether the -m flag is used or not.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dot_clean tool