5.  System facilities

2.1 Generic operations

read                read data
write               write data
<sys/uio.h>         scatter-gather related definitions
readv               scattered data input
writev              gathered data output
<sys/ioctl.h>       standard control operations
ioctl               device control operation

2.2 File system

      Operations marked with a * exist in two forms: as shown, operating on a file name, and operating on a file descriptor, when the name is preceded with a ``f''.

<sys/file.h>        file system definitions
chdir               change directory
chroot              change root directory
mkdir               make a directory
rmdir               remove a directory
open                open a new or existing file
mknod               make a special file
portal              make a portal entry
unlink              remove a link
stat*               return status for a file
lstat               returned status of link
chown*              change owner
chmod*              change mode
utimes              change access/modify times
link                make a hard link
symlink             make a symbolic link
readlink            read contents of symbolic link
rename              change name of file
lseek               reposition within file
truncate*           truncate file
access              determine accessibility
flock               lock a file

2.3 Communications
<sys/socket.h>      standard definitions
socket              create socket
bind                bind socket to name
getsockname         get socket name
listen              allow queuing of connections
accept              accept a connection
connect             connect to peer socket
socketpair          create pair of connected sockets
sendto              send data to named socket
send                send data to connected socket
recvfrom            receive data on unconnected socket
recv                receive data on connected socket
sendmsg             send gathered data and/or rights
recvmsg             receive scattered data and/or rights
shutdown            partially close full-duplex connection
getsockopt          get socket option
setsockopt          set socket option

2.4 Terminals, block and character devices

2.5 Processes and kernel hooks