Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any differences between /etc and /private/etc on Mac OS X?

share|improve this question

migrated from stackoverflow.com Apr 14 '11 at 11:02

This question came from our site for professional and enthusiast programmers.

10  
FYI, in Mac OS, /etc links to /private/etc. – Felix Apr 14 '11 at 10:39
    
tnx, what's about /usr ? shouldn't it link to /Users/myUser ? – gilsilas Apr 14 '11 at 10:43
1  
@gilsilas: I suggest you have a look at en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard – Felix Apr 14 '11 at 10:47
    
FileSystem Hierarchy Standard is just for Linux and not for Unix - for OSX see en.wikipedia.org/wiki/Hierarchical_File_System for the disk structure and developer.apple.com/library/mac/#documentation/MacOSX/… for the directories – Mark Apr 14 '11 at 12:26
    
@gilsias Regarding @Felix's answer: No! /usr is not where user home folders are located in (most) Linux distros! – msanford Apr 14 '11 at 23:37
up vote 21 down vote accepted

On i386/darwin10.0/10.7.0:

%  ls -aFGl / | grep private
lrwxr-xr-x@   1 root  wheel        11 Apr 28  2010 etc@ -> private/etc
drwxr-xr-x@   6 root  wheel       204 Apr 28  2010 private/
lrwxr-xr-x@   1 root  wheel        11 Apr 28  2010 tmp@ -> private/tmp
lrwxr-xr-x@   1 root  wheel        11 Apr 28  2010 var@ -> private/var

%  ls -aFGl /private
total 0
drwxr-xr-x@  6 root  wheel   204 Apr 28  2010 ./
drwxrwxr-t  32 root  admin  1156 Jan 19 10:04 ../
drwxr-xr-x  95 root  wheel  3230 Apr  7 07:06 etc/
drwxr-xr-x   2 root  wheel    68 Jan 27  2010 tftpboot/
drwxrwxrwt   9 root  wheel   306 Apr 15 09:03 tmp/
drwxr-xr-x  26 root  wheel   884 Apr 28  2010 var/

So /etc is a symlink. To /private/etc, which is a directory. They both have the same contents. The same is true for /tmp and /var.

share|improve this answer
    
The same with /var and /tmp. – Daniel Beck Apr 14 '11 at 11:30
1  
Regarding your command, I'm curious, what's your alias/function ls definition? – Daniel Beck Apr 14 '11 at 11:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .