13

Is it possible to open the /dev/ directory in Finder? If not why? Is it on some kind of exclude list?

I would like to use a GUI to list the files there on macOS Catalina.

Is this possible?

bmike
  • 235,889
Tom
  • 592
  • 1
  • 6
  • 13

2 Answers2

21

Looking at what Finder (1) does using Hopper reveals that there are indeed hard-coded exclusion paths, and it rewrites paths starting with /dev/ to /.

enter image description here

You can verify this by pressing Command+Shift+G and entering a path starting with /dev/ -- i.e. /dev/foo. You'll be presented with /.

(1) Located at /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder.

19h
  • 760
  • 3
  • 7
6

It’s not clear if Finder has a special case to avoid this folder, but no - it doesn't want to show that folder.

Normally, I would try the go to functionality using a key shortcut of shift-command-G (or use the pointer and the go menu of Finder) and type in /dev

How to change path in Finder by entering the path manually?

Now, most unix directories are hidden, so toggle hidden files with shift-command-. (period) and you will see it's notably absent.

I’ll keep poking at this, but for now, my Catalina Macs don’t want to show you this in Finder.

A possible solution is to use ForkLift.

  • Make sure to grant it full disk access in system preferences for this app when it asks or after you run it once.
  • Make sure it's showing hidden files
  • /dev shows up like a mounted drive at the root directory
bmike
  • 235,889
  • 1
    I get: "The folder can't be found." https://imgur.com/a/4eLsdpk – Tom Apr 12 '20 at 12:16
  • 1
    Did you try that, Mike? /dev opens /Developer, /dev/ just error-beeps (on Mojave at least). – nohillside Apr 12 '20 at 12:18
  • 1
    @bmike /dev is the devices folder with block and character devices like disk0 or ttyp0 – klanomath Apr 12 '20 at 12:19
  • 1
    Aah, Tom. If you can get to /usr/local and not /dev that implies your user that runs finder doesn’t have permission. Try looking at / – bmike Apr 12 '20 at 12:19
  • 4
    Any user has permission to browse /dev, a lot of things wouldn't work otherwise on a Unix system. – nohillside Apr 12 '20 at 12:21
  • 1
    Sorry for posting part and coming back for the edit. I’ve changed it to no, and trying this doesn’t work. – bmike Apr 12 '20 at 12:21
  • 1
    dr-xr-xr-x 3 root wheel 8226 Apr 4 09:52 /dev – nohillside Apr 12 '20 at 12:22
  • 1
    Exactly. Even with hidden files turned on I'm not seeing /dev, but inside the Terminal, not using root, I can. Doesn't really makes sense to me. I don't want to change any permissions. If it's not possible, so be it :D – Tom Apr 12 '20 at 12:22
  • 5
    Yeah - I wonder if ForkLift or another finder replacement is needed .... I was totally wrong on the yes and the Unix permissions – bmike Apr 12 '20 at 12:25
  • 4
    @bmike Indeed. Using ForkLift you can view it. Wow. Not really a solution, since I won't be switching, but thanks for the tip! – Tom Apr 12 '20 at 12:28
  • 3
    @Tom Thanks for the great question, I learned finder has blind spots that don't make sense overall in the generic permissions model. Some people will learn about hidden files through this - sounds like you had a deeper question than I suspected at first. – bmike Apr 12 '20 at 12:33