On 24 Mar 2017, at 01:03, ron minnich <rminnich@gmail.com> wrote:
In Unix, resources have names. They are visible in a name space, organized into directories. The names can be enumerated by opening and reading a directory. Information about them can be determined with stat. Their contents can be read by open and read. They can be changed with open and write.
And if, for instance, I have a regular need to enumerate various properties of the avatars of the PCI devices in the filesystem, I might decide to write a program which does that, rather than patching together some arcane mass of cat | sed |awk each time (if even the contents of the avatars isn't some awful binary blob, which I think it should not be but whether that's a Unixism or not I am not sure). I might call that command 'lspci'.
Or in other words, the existence of commanda like 'lspci', and the existence of PCI device avatars in the file system is not at all mutually exclusive, unless you think people should not write utilities beyond those handed down of old.
Indeed I've frequently written commands just like this which look through files in /proc for useful things.
(None of this is meant to imply that systems which have such commands have got this right -- I completely agree that they should present things in the filesystem -- just that they could have got it right and the command might still exist.)