????1.#include <unistd.h>
??????POSIX????????unix??Click="javascript:tagshow(event, '??');" target="_self">?????????????????????????????UNIX?????????????
???????磺read??????write??????getpid????
????2.#include <fcntl.h >
??????????????open??fcntl???????
????3.#include <stdlib.h>
????stdlib.h??C????????????????????????????????????????? α?????????????? ????????亯???? ????????????????????? C++????????????cstdlib????.
????????malloc()??calloc()??realloc()??free()??system()??atoi()??atol()??rand()?? srand()??exit()????
????4.#include <conio.h >
????conio.h????C??????е???????conio??Console Input/Output???????????????????д?????ж??????????????????????????????????????????????Щ?????????????????????????
????????getch()????????
????5.#include <sys/stat.h >
????stat.h??????????????????????????????????????????????????飬????????????
????int stat(const char *restrict pathname??struct stat *restrict buf);int fstat(int fields??struct stat *buf);int lstat(const char *restrict pathname??struct stat *restrict buf);
?????????:????????0?????????-1?????????pathname??stat???????????????????й?????????fstat?????????????????fields?????????й??????lstat??????????stat.??????????????????????????????lstat????÷?????????й??????????????÷??????????????????????????????buf?????????????????????????????Щ??????д??buf????????y????????????????????????.stat???????£?
struct stat{
mode_t st_mode; //??????????????
ino_t st_ino; //i?????
dev_t st_dev; //device number (file system)
dev_t st_rdev; //device number for special files
nlink_t st_nlink; //??????????
uid_t st_uid; //???ID
gid_t st_gid; //??ID
off_t st_size; //size in bytes??for regular files
time_t st_st_atime; //????η???????
time_t st_mtime; //??????????α?????????
time_t st_ctime; //?????????α?????????
blksize_t st_blksize; //best I/O block size
blkcnt_t st_blocks; //number of disk blocks allocated
};