Я можу lsвміст /dev/fd...
$ ls -Al /dev/fd
total 0
crw--w---- 1 andy tty 16, 1 Jan 25 14:17 0
crw--w---- 1 andy tty 16, 1 Jan 25 14:17 1
crw--w---- 1 andy tty 16, 1 Jan 25 14:17 2
drw-r--r-- 19 andy staff 608 Jan 25 00:43 3/
dr--r--r-- 1 root wheel 0 Jan 23 20:42 4/
Але я не можу оглянути ні дрі, 3/ні 4/с stat.
$ stat /dev/fd/4
stat: /dev/fd/4: stat: Bad file descriptor
Чому? Я намагаюсь знову реалізувати lsкоманду для власних цілей навчання, і це справді мене відвертає!
Я на MacOS High Sierra 10.13.2