秀杰空间

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条评论 1781点热度 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条评论 2382点热度 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条评论 1661点热度 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条评论 2194点热度 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条评论 2287点热度 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条评论 2725点热度 0人点赞 秀杰 阅读全文
1…45678

秀杰

做些有意义的事情

分类
  • Linux Shell
  • Linux/Unix C/C++
  • PHP
  • Tuxedo中间件
  • 分享软件
  • 开发环境
  • 心情笔记
  • 我的项目
  • 软件架构师
最新 热点 随机
最新 热点 随机
C++使用protobuf快速入门简明教程 Mac安装Brew(Homebrew)国内镜像源加速 从sockaddr_storage结构中取IP地址和端口 [转载]分布式之数据库和缓存双写一致性方案解析 TPS和QPS的区别和理解 2018最新可靠好用的DNS服务器地址汇总
UNIX环境高级编程学习之第九章进程关系-创建孤儿进程 UNIX环境高级编程学习之第十六章网络IPC:套接字 - 非阻塞的Socket通信Select模型(多路复用), 实用Socket通信模板。 UNIX环境高级编程学习之第十一章线程-使用读写锁 UNIX环境高级编程学习之第六章系统数据文件和信息-实现uid to name UNIX环境高级编程学习之第三章文件IO-文件读操作 UNIX环境高级编程学习之第十章信号-信号的基本操作(绑定/忽略/默认/发送)

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

Theme Kratos Made By Seaton Jiang

京ICP备11019155号-2