MacPorts 2.3.2 and "port provides"

Jan Stary hans at stare.cz
Thu Mar 5 06:13:31 PST 2015


On Mar 05 14:26:37, cal at macports.org wrote:
> I don't know why it exists, but a couple of top-level directories
> are symlinked into /private.

In my case,

$ ls -l /private/
total 0
drwxr-xr-x  103 root  wheel  3502 Mar  2 21:21 etc/
drwxr-xr-x    2 root  wheel    68 Sep 24  2007 tftpboot/
drwxrwxrwt   35 root  wheel  1190 Mar  5 14:41 tmp/
drwxr-xr-x@  26 root  wheel   884 Jan 17  2011 var/

> > For example,
> > 
> >  $ vi /tmp/foo
> > 
> > creates "/tmp/foo" (obviously), but once I save it (:w),
> > it gets saved as "/private/tmp/foo"; at that moment,
> > there are two hardlinks for the same inode:
> > 
> >  $ ls -li /tmp/foo /private/tmp/foo
> >  15307909 -rw-r--r--  1 hans  wheel  6 Mar  5 12:55 /private/tmp/foo
> >  15307909 -rw-r--r--  1 hans  wheel  6 Mar  5 12:55 /tmp/foo
> 
> Those aren't hardlinks, but /tmp is a symlink to /private/tmp. Your
> vim just happens to realpath(3) before saving, it seems.

It's not a symlink, they have the same inode number.
A symlink would look like this:

$ ln -s foo bar
$ ls -li foo bar
15368325 lrwxr-xr-x  1 hans  wheel  3 Mar  5 15:12 bar -> foo
15307909 -rw-r--r--  1 hans  wheel  6 Mar  5 12:55 foo



More information about the macports-users mailing list