摘要:
参考伪代码实现ls的功能,提交代码的编译,运行结果截图,码云代码链接。 打开目录文件 针对目录文件 读取目录条目 显示文件名 关闭文件目录文件 #include <stdio.h> #include <dirent.h> #include <sys/types.h> void myls(char [ 阅读全文
posted @ 2022-10-15 23:12
20201208史逸霏
阅读(23)
评论(0)
推荐(0)
摘要:
代码 #include <stdio.h> #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> #include <pwd.h> #include <grp.h> #include <unistd.h> #include 阅读全文
posted @ 2022-10-15 23:07
20201208史逸霏
阅读(19)
评论(0)
推荐(0)
摘要:
1.stat(1) 2.man -k ,grep -r的使用 3.伪代码 判断输入中是否包含文件参数——若有,则继续。 ——若没有,则提示用户输入错误。 然后声明结构体,并调用stat()函数给结构体复制,将文件的设备编号、节点、文件的类型和存取的权限、镰刀该文件的硬链接数目等按顺序输出。 4.产品 阅读全文
posted @ 2022-10-15 22:54
20201208史逸霏
阅读(38)
评论(0)
推荐(0)
浙公网安备 33010602011771号