秀杰空间

Linux/Unix C/C++
Linux/Unix C/C++

UNIX环境高级编程学习之第六章系统数据文件和信息-取所有用户名和UID, GID

UNIX环境高级编程学习之第六章系统数据文件和信息-取所有用户名和UID, GID [code lang="cpp"]#include <stdio.h> #include <pwd.h> #include <stddef.h> int main() { struct passwd *ptr; setpwent(); while((ptr = getpwent()) != NULL) { printf("name = %-10s ", ptr->pw_n…

2016年7月19日 0条评论 1799点热度 0人点赞 秀杰 阅读全文
Linux/Unix C/C++

UNIX环境高级编程学习之第六章系统数据文件和信息-实现uid to name

UNIX环境高级编程学习之第六章系统数据文件和信息-实现uid to name [code lang="cpp"]#include <stdio.h> #include <stddef.h> #include <string.h> #include <pwd.h> char * getuidtoname(unsigned int uid) { struct passwd *ptr; setpwent();//实现打开/etc/passwd文件 while((ptr =…

2016年7月19日 0条评论 2407点热度 0人点赞 秀杰 阅读全文
Linux/Unix C/C++

UNIX环境高级编程学习之第四章文件和目录-用C实现Shell中的"ls -l"功能

UNIX环境高级编程学习之第四章文件和目录-用C实现Shell中的"ls -l"功能 [code lang="cpp"]// 只能查看目录中的所有文件属性 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> int main(int argc, cha…

2016年7月19日 0条评论 1682点热度 0人点赞 秀杰 阅读全文
Linux/Unix C/C++

UNIX环境高级编程学习之第五章标准IO-实现查看所有用户

UNIX环境高级编程学习之第五章标准IO-实现查看所有用户 [code lang="cpp"]#include <string.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]) { char szBuf[512]; char szName[512]; FILE *f = fopen("/etc/passwd",…

2016年7月19日 0条评论 2211点热度 0人点赞 秀杰 阅读全文
Linux/Unix C/C++

UNIX环境高级编程学习之第三章文件IO-文件读偏移操作

UNIX环境高级编程学习之第三章文件IO-文件读偏移操作 [code lang="cpp"]#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> int …

2016年7月19日 0条评论 2309点热度 0人点赞 秀杰 阅读全文
Linux/Unix C/C++

UNIX环境高级编程学习之第三章文件IO-文件读操作

UNIX环境高级编程学习之第三章文件IO-文件读操作 [code lang="cpp"] #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> int e…

2016年7月19日 0条评论 2746点热度 0人点赞 秀杰 阅读全文
1…45678

秀杰

做些有意义的事情

分类
  • Linux Shell
  • Linux/Unix C/C++
  • PHP
  • Tuxedo中间件
  • 分享软件
  • 开发环境
  • 心情笔记
  • 我的项目
  • 软件架构师
最新 热点 随机
最新 热点 随机
C++使用protobuf快速入门简明教程 Mac安装Brew(Homebrew)国内镜像源加速 从sockaddr_storage结构中取IP地址和端口 [转载]分布式之数据库和缓存双写一致性方案解析 TPS和QPS的区别和理解 2018最新可靠好用的DNS服务器地址汇总
UNIX环境高级编程学习之第四章文件和目录-用C实现Shell中的"ls -l"功能 UNIX环境高级编程学习之第六章系统数据文件和信息-修改第四章实现的Shell的“ls -l”功能 UNIX环境高级编程学习之第十二章线程控制-以分离状态创建线程 UNIX环境高级编程学习之第十五章进程间通信 - 通过匿名管道实现父子进程同步 Makefile 同时编译静态库和动态库 UNIX环境高级编程学习之第十三章守护进程 - 初始化一个守护进程

COPYRIGHT © 2023 个人笔记. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

京ICP备11019155号-2