In Linux, if I want to get the file descriptors of a process, I would go to the following directory:
/proc/<pid>/fd
But in UNIX V7, the /proc
directory does not exist.
You can't do this in Unix v7 unless you resort to poking around in /dev/kmem. This is basically what ps(1) does so it's not unheard of.
If you're interested in pursuing this, look at the source for ps to see how it locates the process table in kernel memory, then make a similar tool that reads the global file table. The next step will then be to locate the user area for each process so that you know which files are open by whom. This may require you to look in /dev/swap for processes that are swapped out, but I think the ps sources have an example of how to do that as well.
lsof
could be made to work on V7 and that it would show you the file descriptors of a process.proc
filesystem came to Unix via Unix's successor Plan9 from Bell Labs, which started in the mid-80s and was released in 1992. Anything older than that wouldn't have it, since the idea didn't exist. After that, it depends on how fast the particular developers were adopting the idea.