I'm familiar with the 3 file mode 'bits' defining user, group, and other permissions as well as the setuid/setgid/sticky 'bit', but when I stat the root level directories on my MacOSX laptop I see 1 to 2 extra fields. What are these? [onlyanegg@macosx ~]$ stat -f '%p %N' /* 40775 /Applications 40755 /Library 40755 /Network 40755 /System 40755 /Users 41777 /Volumes 40755 /bin 41775 /cores 40555 /dev120755 /etc 40555 /home100644 /installer.failurerequests 40555 /mnt 40555 /net 40775 /opt 40755 /private 40755 /sbin120755 /tmp 40755 /usr120755 /var
File mode on MacOSX
files;permissions;osx
stat(1) specifies that %p requestsFile type and permissions.(look for datum in the linked page). The value displayed is all of st_mode (see stat(2): #define S_IFMT 0170000           /* type of file */ #define        S_IFIFO  0010000  /* named pipe (fifo) */ #define        S_IFCHR  0020000  /* character special */ #define        S_IFDIR  0040000  /* directory */ #define        S_IFBLK  0060000  /* block special */ #define        S_IFREG  0100000  /* regular */ #define        S_IFLNK  0120000  /* symbolic link */ #define        S_IFSOCK 0140000  /* socket */ #define        S_IFWHT  0160000  /* whiteout */ #define S_ISUID 0004000  /* set user id on execution */ #define S_ISGID 0002000  /* set group id on execution */ #define S_ISVTX 0001000  /* save swapped text even after use */ #define S_IRUSR 0000400  /* read permission, owner */ #define S_IWUSR 0000200  /* write permission, owner */ #define S_IXUSR 0000100  /* execute/search permission, owner */This explains the values you're getting:values starting with 4 are directories (/Applications, /Library...)values starting with 12 are symbolic links (/etc, /tmp, /var)values starting with 10 are regular files (/installer.failurerequests)