- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 《UNIX/LINUX编程实践教程》实例注释chapt8 - psh1
/*psh1 *带提示符的shell */ #include <stdio.h> #include <signal.h> #include <string.h> #include <stdlib.h> #define MAXARGS 20 /*最多MAXARGS个命令行参数 */ #define ARGLEN 100 ...
2018-03-14 21:14:14 165
原创 《UNIX/LINUX编程实践教程》实例注释chapt4 - spwd
/*spwd.c 获取当前路径 */ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> #include <stdlib.h> #include <string.h> ino_t get_inode(cha...
2018-03-10 18:48:51 152
原创 《UNIX/LINUX编程实践教程》实例注释chapt3 - ls1
/*ls1.c *打印目录文件 */ #include <stdio.h> #include <sys/types.h> #include <dirent.h> void do_ls(char[]); main(int argc, char *argv[]) { if (argc == 1) do_ls("."); //不带...
2018-03-04 19:39:09 153
原创 《UNIX/LINUX编程实践教程》实例注释chapt2 - logout_tty
/*logou_tty.c *注销用户,在utemp文件中将指定的tty注销。 */ #include <stdio.h> #include <utmp.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #inc...
2018-03-04 17:12:36 212
原创 《UNIX/LINUX编程实践教程》实例注释chapt2 - who3
对who2使用缓冲技术./*who3.c 从buffer中打印who信息 */ #include <stdio.h> #include <utmp.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #include...
2018-03-04 11:49:57 217
原创 《UNIX/LINUX编程实践教程》实例注释chapt2 - who2
#include <stdio.h> #include <utmp.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #define SHOWHOST void showtime(long); void show_...
2018-03-03 18:58:43 176
原创 《UNIX/LINUX编程实践教程》实例注释chapt1 - more2
#include <stdio.h> #include <stdlib.h> #define PAGELEN 24 #define LINELEN 512 void do_more(FILE *); //将数据输出到屏幕 int see_more(FILE *); //接受用户输入 int main(int argc, char **argv){...
2018-03-03 18:55:38 173
Ansible office文档
2018-01-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人