hn.today

dot_clean man Page

ss64.com3 points0 comments
Screenshot of dot_clean man Page

dot_clean is a macOS command-line utility for handling hidden “._” files, which store AppleDouble metadata associated with ordinary files. Given one or more directories, it recursively combines metadata from these sidecar files with the corresponding native files. By default, when both contain the same attribute, dot_clean keeps the more recently modified information. Directories supplied together are processed in the order listed; without a directory argument, the command prints usage information.

The keep options control which metadata takes precedence: keep=mostrecent is the default, keep=dotbar always favors the AppleDouble file, and keep=native favors the native file’s data fork and ignores AppleDouble information. The -m option deletes all “._” files, a useful cleanup when sharing files with non-Mac systems; -n deletes a sidecar only when no matching native file exists. The -f option limits merging to the specified directory rather than traversing subdirectories, while -s follows symbolic links and -v displays detailed output. For example, dot_clean -m ~/demo merges metadata and removes the sidecars in that folder, while dot_clean keep=dotbar /Volumes/test merges a mounted volume using the sidecar data. The utility returns zero on success and a positive status if an error occurs.

Read on ss64.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.