macOS Catalina – What Should /private/tmp Look Like?

catalinamacossymlink

This is my /tmp and /private:

# ls -lA /tmp /private/
lrwxr-xr-x@ 1 root  admin  11 Oct 18 18:48 /tmp -> private/tmp

/private/:
total 0
drwxr-xr-x  121 root  wheel  3872 Oct 21 13:27 etc
drwxr-xr-x    2 root  wheel    64 Aug 24 19:01 tftpboot
lrwxr-xr-x@   1 root  wheel    11 Jul 26  2018 tmp -> private/tmp
drwxr-xr-x   29 root  wheel   928 Oct 21 08:08 var
#

This is on macOS 10.15.1 Catalina beta after restoring from a backup made during the early September beta of Catalina 10.15.0. The tmp file in /private appears to be a link to private/tmp, which doesn't exist. If it had a leading / it would be a circular reference to itself.

Two questions:

  1. Should /tmp be a link to /private/tmp ?
  2. (Assuming yes) What should /private/tmp actually be? A directory?

Thanks!

Best Answer

Here is how my Catalina machine looks:

Charlie:/ sfederman$ ls -lA /tmp /private/
lrwxr-xr-x@ 1 root  admin  11 Jul 16 14:05 /tmp -> private/tmp

/private/:
total 0
drwxr-xr-x  86 root  wheel  2752 Oct 19 19:43 etc
drwxr-xr-x   2 root  wheel    64 Jul  6 01:22 tftpboot
drwxrwxrwt   9 root  wheel   288 Oct 21 10:59 tmp
drwxr-xr-x  28 root  wheel   896 Oct  4 10:24 var

So:

  1. Yes, /tmp is a softlink to /private/tmp
  2. /private/tmp is a directory.