计算机
lstat() 与 stat() 类似, 但当文件是符号链接时, lstat() 返回该符号链接的有关信息,
而不是由该符号链接引用文件的信息
[ 本帖最后由 madfrogme 于 2012-9-26 19:05 编辑 ]
2012-08-31 10:07

2012-08-31 10:08

2012-08-31 10:25
void setbuf( FILE *restrict fp, char *restrict buf); int setvbuf( FILE *restrict fp, char *restrict buf, int mode, size_t size);
setvbuf( stream, buf, buf? _IOFBUF: _IONBUF, BUFSIZ);

2012-08-31 13:31
2012-08-31 13:44

2012-08-31 23:50

2012-08-31 23:52
list_entry(task->next, struct task_struct, tasks)

2012-08-31 23:56

2012-09-01 09:23
程序代码:#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
int main(void) {
struct passwd *pw;
pw = getpwuid(501); /*或者是 getpwnam("wzj"); 用来返回一个指向passwd结构体的指针*/
printf("%s\n",pw->pw_name); /*用户名*/
printf("%s\n",pw->pw_passwd); /*密码,用'*'表示*/
printf("%d\n",pw->pw_uid);
printf("%d\n",pw->pw_gid);
printf("%s\n",pw->pw_gecos); /*注释字段*/
printf("%s\n",pw->pw_dir); /*初始shell*/
printf("%s\n",pw->pw_shell);
return 0;
}
2012-09-01 09:48