Intro to OSX System directory conventions

Unix knowledge will help a lot as long as it is not following Linux or other conventions exactly (Linux is Unix like whilst OSX is a Unix based on BSD)

Some description is given by Apple in this developer documentation (The link does not seem to be exact but look for the OSX part not IOS) There are several sections which are too long to list here.

One is for UNIX-specific directories but I am surprised to see "/usr—Contains non-essential command-line binaries, libraries, header files, and other data." They might be non-essential but removing this will break a lot - you should only change things in /usr/local

Another is The Library Directory Stores App-Specific Files The main sections are

  • Application Support - app data files except those associated with the user’s documents
  • Caches - app-specific support files that your app can re-create easily.
  • Frameworks - frameworks that must be shared by multiple apps
  • Preferences - app-specific preference files used the NSUserDefaults class or CFPreferences API

Treat this as a guide as many (Most?) apps do not follow this 100%.

Mono has in the past put things in the wrong place e.g. in /usr/bin Other apps use Preferences not via the API. Other apps use directories in ~/Library itself e.g. Mail.app