Linux????????????????????????
???????????? ???????[ 2014/4/22 11:39:17 ] ????????Linux ????
????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
};
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11