4

With macOS Sierra APFS came with a new concept of "firmlinks", often described as being "between hardlinks and symlinks".

Several folders are now at System/Volumes/Data but are firmlinked to locations in the root of the filesystem. Three examples I know of:

  • /Library -> /System/Volumes/Data/Library
  • /Users -> /System/Volumes/Data/Users
  • /Applications -> /System/Volumes/Data/Applications

Is there a way when doing an ls of / from the Terminal to see which entries in that directory are actually firmlinks? There is no mention of firmlinks in the ls man page. The switches I know of for ls that gives the most detailed output is: ls -alO@ / but it doesn't seem to tell me:

drwxr-xr-x  20 root  wheel  sunlnk             640 24 Aug 16:59 .
drwxr-xr-x  20 root  wheel  sunlnk             640 24 Aug 16:59 ..
lrwxr-xr-x   1 root  admin  -                   36 24 Aug 16:59 .VolumeIcon.icns -> System/Volumes/Data/.VolumeIcon.icns
----------   1 root  admin  -                    0 24 Aug 16:59 .file
drwxr-xr-x   2 root  wheel  hidden              64 24 Aug 16:59 .vol
drwxrwxr-x  44 root  admin  sunlnk            1408 28 Oct 09:31 Applications
drwxr-xr-x  67 root  wheel  sunlnk            2144 14 Sep 10:42 Library
drwxr-xr-x@  9 root  wheel  restricted         288 24 Aug 16:59 System
    com.apple.rootless     0 
drwxr-xr-x   5 root  admin  sunlnk             160 24 Aug 16:59 Users
drwxr-xr-x   3 root  wheel  hidden              96 25 Oct 15:39 Volumes
drwxr-xr-x@ 38 root  wheel  restricted,hidden 1216 24 Aug 16:59 bin
    com.apple.rootless     0 
drwxrwxr-t   2 root  admin  hidden              64  8 Dec  2020 cores
dr-xr-xr-x   4 root  wheel  hidden            4888 25 Oct 15:39 dev
lrwxr-xr-x@  1 root  wheel  restricted,hidden   11 24 Aug 16:59 etc -> private/etc
    com.apple.rootless     0 
lrwxr-xr-x   1 root  wheel  hidden              25 25 Oct 15:39 home -> /System/Volumes/Data/home
drwxr-xr-x   2 root  wheel  hidden              64  8 Dec  2020 opt
drwxr-xr-x   6 root  wheel  sunlnk,hidden      192 25 Oct 15:39 private
drwxr-xr-x@ 65 root  wheel  restricted,hidden 2080 24 Aug 16:59 sbin
    com.apple.rootless     0 
lrwxr-xr-x@  1 root  wheel  restricted,hidden   11 24 Aug 16:59 tmp -> private/tmp
    com.apple.rootless     0 
drwxr-xr-x@ 11 root  wheel  restricted,hidden  352 24 Aug 16:59 usr
    com.apple.rootless     0 
lrwxr-xr-x@  1 root  wheel  restricted,hidden   11 24 Aug 16:59 var -> private/var
    com.apple.rootless     0 

1 Answer 1

4

There is no switch for ls to provide the info, but the info is available via other means.

Howard Oakley, (as ever!) has a good writeup on the filesystem changes in Catalina. He covers firmlinks in some detail (although, as you observe, firmlinks appeared earlier) and also links to a Bombich article on the same.

There is some 'magic' using /usr/share/firmlinks which describes which firmlinks are present. And Oakley's article mentions /etc/synthetic.conf which can be used by users to create their own, and further link to a relevant article.

https://eclecticlight.co/2020/01/23/catalina-boot-volumes/

https://bombich.com/kb/ccc5/working-apfs-volume-groups

https://derflounder.wordpress.com/2020/01/18/creating-root-level-directories-and-symbolic-links-on-macos-catalina/

As /usr/share/firmlinks only lists a limited number from the OS install, while possible to have a script merge the output of ls with the list is possible, it would be a bit pointless and static, with the exception of what the user has implemented in /etc/synthetic.conf. But again there, one would expect the user to have recollection of its contents.

4
  • Your second link is to the documentation of an old version of CCC. I'm not sure if there's much of a difference in the updated page, though.
    – Barmar
    Oct 30, 2022 at 21:51
  • Thx for pointing that out. It's the same link as mentioned in the Eclectic Light article though, not one I've hunted down myself. Seems the CCC website takes every opportunity to remind you that CCC-5 isn't current... but yes, the info is still relevant. Oct 30, 2022 at 22:24
  • 1
    Probably best to link to one that doesn't start with a notice that you're looking at an old version.
    – Barmar
    Oct 30, 2022 at 22:38
  • The notice is related to the software, not the information, and as I said is the same link in the first article. I just pulled it out for convenience. This question and answer has nothing to do with CCC. The CCC6 version of the article is identical, and would be equally 'out of date' by your reckoning when CCC7 is released. Oct 30, 2022 at 23:15

You must log in to answer this question.

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