Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Simple and concise documentation on the OSX folder hierarchy is sparse. I'm looking for a simple description of each - what are the functions of each?

  • /private
  • /var
  • /usr
  • /tmp
  • /etc
  • /bin
  • /sbin
  • /fseventsd

I don't plan to modify them in any way, I just want to understand the FS hierarchy.

share|improve this question
1  
Thank you both for your responses and the detailed literature linked to. I have a much clearer picture now. Thank you "ask different" community! –  user78503 May 21 at 5:45

2 Answers 2

up vote 23 down vote accepted

It's a bit messy, and there is a degree of cross-overs, but the quick tour, without really going into the subfolders of these:

/etc, /tmp and /var are just symbolic links to subfolders in /private.

/etc generally contains configuration files.

/tmp is for temporary files used by running processes (also see /var/tmp)

/var is also used for somewhat temporary files used by running processes, but these tend to be less temporary and more often preserved between runs - e.g. logfiles which are usually in /var/log.

/usr contains binaries (executables) and developer-related files for core unix/BSD utilities. Things the user installs themselves should end up in /usr/local.

/bin also contains binaries but they tend to be more OS-fundamental than those in /usr - such as cp, cat, bash.

/sbin is as above but focused on routine administrative tasks such as mount and shutdown. The s=system/superuser, usually you need root/superuser rights to use these commands.

/.fseventsd is used by the OS to log file-system change events (such as folder creation) so that interested parties can be notified when the filesystem changes.

However, to run the risk of saying what you didn't want me to say - most of these are of little interest, and if you were to use any, you'd be most likely to be in /usr/local, /var/log or /tmp.

Additional information with a focus on the common Unix structure can be found on Wikipedia (Unix File System).

share|improve this answer

See man hier:

  • /private: this is undocumented
  • /var: multi-purpose log, temporary, transient, and spool files
  • /usr: contains the majority of user utilities and applications
  • /tmp: temporary files
  • /etc: system configuration files and scripts
  • /bin: user utilities fundamental to both single-user and multi-user environments
  • /sbin: system programs and administration utilities fundamental to both single-user and multi-user environments
  • /fseventsd: I believe you mean /.fseventsd. It is documented here. gzipped data relating to file deletion and file system events is stored in a series of files in /.fseventsd.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.