![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
Lueeee.
这个作者很懒,什么都没留下…
展开
-
2021-08-21
链表的嵌套数据结构原创 2021-08-21 23:45:41 · 65 阅读 · 0 评论 -
2021-08-20
##Linux文件编程完全掌握原创 2021-08-20 21:03:47 · 49 阅读 · 0 评论 -
2021-08-19
system函数system()函数的返回值如下:成功,则返回进程的状态值当sh不能执行时,返回127,失败返回-1原创 2021-08-19 21:58:14 · 47 阅读 · 0 评论 -
2021-08-18
execl函数//文件execl.c#include <stdio.h>#include <stdlib.h>#include <unistd.h>//函数原型:int execl(const char *path, const char *arg, ...);int main(void){ printf("before execl\n"); if(execl("./echoarg","echoarg","-l",NULL) == -1)原创 2021-08-18 20:39:46 · 42 阅读 · 0 评论 -
2021-08-17
Linux进程exec族函数exec函数不会创建新的进程原创 2021-08-17 22:13:28 · 36 阅读 · 0 评论 -
2021-08-16
exec函数族参数说明:path:可执行文件的路径名字arg:可执行程序所带的参数,第一个参数为可执行文件名字,没有带路径且arg必须以NULL结束file:如果参数file中包含/,则就将其视为路径名,否则就按PHTH环境变量,在它所指定的各目录中搜寻可执行文件。...原创 2021-08-16 21:53:53 · 35 阅读 · 0 评论 -
2021-08-15
exec族函数https://blog.csdn.net/u014530704/article/details/73848573原创 2021-08-15 22:02:11 · 28 阅读 · 0 评论 -
2021-08-14
Linux进程.父子进程与孤儿进程孤儿进程父进程如果不等待子进程退出,在子进程之前就结束了自己的“生命”,此时子进程叫做孤儿进程 Linux避免系统存在过多孤儿进程,init进程收留孤儿进程,变成孤儿进程的父进程。wait()waitpid()fork()vfork()僵死进程...原创 2021-08-14 14:39:12 · 37 阅读 · 0 评论 -
2021-08-13
Linux进程_创建进程函数fork的使用#include <stdio.h>#include <sys/types.h>#include <unistd.h>int main(){ pid_t pid; pid_t pid2; pid = getpid(); printf("fork before pid:%d\n",pid); fork(); pid2 = g原创 2021-08-13 12:43:28 · 33 阅读 · 0 评论 -
2021-08-12
Linux进程相关概念1.什么是程序,什么是进程,有什么区别?2.如何查看系统中有哪些进程?3.什么是进程标识符?4.什么叫父进程,什么叫子进程?5.c程序的存储空间是如何分配?原创 2021-08-12 10:55:18 · 33 阅读 · 0 评论 -
2021-08-11
Linux标准c库#include <stdio.h>#include <string.h>int main(){ FILE *fp; char *str = "chenlichen hen shuai"; char readBuf[128] = {0}; fp = fopen("./chen.txt","w+"); fwrite(str,sizeof(char)*strlen(str),1,原创 2021-08-11 22:39:59 · 32 阅读 · 0 评论 -
2021-08-10
Linux写结构体数组到文件#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <string.h>struct Text{ int a; char c;};int main()原创 2021-08-10 22:21:37 · 32 阅读 · 0 评论 -
2021-08-10
Linux写一个整数到文件#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <string.h>struct Text{ int a; char c;};int main()原创 2021-08-10 22:09:30 · 28 阅读 · 0 评论 -
2021-08-10
Linux配置文件的修改int main(int argc,char **argv){ int fdSrc; char *readBuf = NULL; fdSrc = open(argv[2],O_RDWR); int size = lseek(fdSrc,0,SEEK_END); lseek(fdSrc,0,SEEK_SET); readBuf = (char *)malloc(sizeof(char)*s原创 2021-08-10 22:03:31 · 30 阅读 · 0 评论 -
2021-08-09
配置文件的修改#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <string.h>int main(int argc,char **argv){ int fdSrc; c原创 2021-08-09 22:49:05 · 34 阅读 · 0 评论 -
2021-08-08
Linux文件哎呀我????,今天忘记写了,凑字,我不想当狗原创 2021-08-08 23:16:09 · 34 阅读 · 0 评论 -
2021-08-07
Linux cp指令代码原文件:src.c目标文件:des.c思路1.打开src.c2.读src到buf3.打开/创建des.c注意:要用到参数 main函数原型要写完整int main( int argc,char **argv)argc为参数cp代码:#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include原创 2021-08-07 19:00:17 · 53 阅读 · 0 评论 -
2021-08-06
配置文件的修改1.找到a位置2.a往后移,移到b3.修改b的位置原创 2021-08-06 21:27:20 · 34 阅读 · 0 评论 -
2021-08-05
-## Linux cp指令代码先打开再读再打开再写原创 2021-08-05 18:38:59 · 33 阅读 · 0 评论 -
2021-08-04
学生成绩管理系统用链表头插法录取学生成绩#include <stdio.h>#include <stdlib.h>struct Text{ int Chinesedata; int Mathdata; int Englishdata; struct Text *next;};void printfChineseScore(struct Text *head){ struct Text *p=head; int原创 2021-08-04 18:42:37 · 54 阅读 · 0 评论 -
2021-08-03
Linux文件的读取与及光标的移动read()lseek()#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <string.h>int main(){ int fd; char *buf = "chenlechen h原创 2021-08-03 15:25:56 · 39 阅读 · 0 评论 -
2021-08-02
Linux创建并写入文件write函数头文件指令:man 2 writeclose函数头文件指令:man 2 writestrlen函数头文件指令:man strlenwrite(fd,buf,strlen(buf));close(fd);#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#include <sys/types.原创 2021-08-02 10:52:48 · 62 阅读 · 0 评论 -
2021-08-01
Linux文件的创建文件描述符:在一个进程中不止一个文件,这个进程会建立结构体,打开你需要的那个文件要看文件描述符。O_RDONLY 只读打开O_WRONLY 只写打开O_RDWR 可读可写打开Linux工作空间下open函数的头文件打开指令:man 2 open先 touch一个file1文件open("./file1",O_RDWR)int fd;//原型file description ,文件描述符open("./file1",O_RDWR);//打开文件file,可读可写的方式原创 2021-08-01 17:07:03 · 41 阅读 · 0 评论 -
2021-07-15
智能晾衣#设计介绍智能晾衣系统使用开源硬件arduino作为主控,涉及按键开关的使用,雨水感应器的使用和直流电机的使用,还会涉及一些机械的运用。通电→按键选择模式①雨水感应模式 → 1号LED指示灯亮 →雨水传感器检测外界是否存雨水,并向主控板arduino传输信号 →传感器检测不到雨水时,电机执行顺时针转动,推出晾衣架,并当运行到限位开关时停止原创 2021-07-15 17:07:10 · 260 阅读 · 0 评论