سؤال

I have an assignment where I need to use some system calls in UNIX, like mktime() and fnmatch(), to complete some operations. We're given only the names of the man pages to look up to find the functions.

Now, this is fine for the purpose of the assignment. But in the future when I do UNIX programming, I may not know the exact name (I never would have known fnmatch exists without knowing its name first).

So the question is: how can I get a comprehensive list of ALL UNIX system functions? I really don't care if it's categorized or sorted (though it would be nice), but I'd like to have the list include the descriptions so it's searchable. That way when I need a function, I can do a few searches to locate potential candidates, then I can man them to find the exact usage.

هل كانت مفيدة؟

المحلول

There's also a useful utility called "apropos"

$ whatis apropos
apropos (1)          - search the manual page names and descriptions


$ apropos filename
...
fnmatch (3)          - match filename or pathname
...

نصائح أخرى

System calls are documented in section 2 of the man documentation. Depending on your version of Unix, you should be able to find these pages in the man data directory.

On Linux, this directory is /usr/share/man/man2; your version of Unix may differ. Also man man should tell you what is in the other sections.

I used to keep a printed copy of part of "The Authorized Guide to Version 3 of the Single UNIX Specification" lying around - the table shows availability of calls in a variety of different standards, which was extremely useful for supporting multiple targets.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top