English 中文(简体)
UNIX System Call Listing?
原标题:

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.





相关问题
What resources are shared between threads?

Recently, I have been asked a question in an interview what s the difference between a process and a thread. Really, I did not know the answer. I thought for a minute and gave a very weird answer. ...

Random access of multiple files and file caching

This relates to some software I ve been given to "fix". The easiest and quickest solution would make it open and read 10 random files out of hundreds and extract some very short strings for processing ...

What form is DLL & what makes it processor dependent

I know DLL contains one or more exported functions that are compiled, linked, and stored separately.. My question is about not about how to create it.. but it is all about in what form it is stored.. ...

Thread behavior on multicore machines

Does the threads of a single process run in parallel on a multi-core machine on windows XP? Is the behavior same on different windows versions (windows server editions) I have heard that only threads ...

How to check which Operating System?

How can I check OS version in a batch file or through a vbs in an Windows 2k/2k3 environment ? You know ... Something like ... : "If winver Win2k then ... or if winver Win2k3 then ....

热门标签