1. The WHO command reads the contents of the system log to display the user who is currently logged in.
2, Unix system to keep the data in the file, you can call the operation file through the following system:
Open (filename, how) creat (filename, mode) read (FD, buffer, AMT) write (FD, buffer, AMT) Lseek (FD, distance, base) Close (FD)
3, the process of the file read/write through the file descriptor, the file descriptor represents the connection between the file and the process.
4, each system call will cause user mode and kernel mode switching and execution of kernel code, so reduce the number of system calls in the program can increase the efficiency of the program operation.
5, the program can reduce the number of system calls by Buffering technology, only call the kernel service when the write buffer is full or the read buffer is empty.
6. The UNIX kernel can reduce the number of disk I/O accesses through kernel buffering.
7. The processing of time in UNIX is a description that is recorded from the beginning of a certain time.
8, when the system call error, the global variable errno is set to the corresponding error code, and then return-1, the program by checking the errno to determine the type of error, and take appropriate measures.