随笔分类 - Linux
I am now systematically learnning Linux and Shell, maybe some views are partly not correct or just false, I am very happy if you guys can point it out when discovered.
摘要:select和poll系统调用最终会使设备驱动中的poll()函数被执行, Linux2.5.45内核还引入和epoll()即extended poll。 int select(int numfds, fd_set *readfds, fd_set *writefds, fd_set *except
阅读全文
摘要:两个函数send and recv 1 num = send(s, addr_of_data, len_of_data, 0); 2 num = recv(s, addr_of_buffer, len_of_buffer, 0); 3 close(s); s: socket s, 是其他client
阅读全文
摘要:To use a character driver, first you should register it with the system. Then you should expose it to the user space. 1. cdev_init and cdev_add functi
阅读全文
摘要:1. 查看识别在某个目录下文件类型: $ ls -ld <file name> 2. 文件可能的类型, 跟着不一样的后缀 1 – : regular file 2 d : directory 3 c : character device file 4 b : block device file 5
阅读全文
摘要:当一个工程里的某些文件需要更新,此时你想执行这个工程,那么此时make就排上用场了。使用make时需要同时有一个对应的makefile(或者Makefile),它定义了一系列需要编译,处理的任务。 make调用编译器编译一系列源代码为二进制文件。 makefile里的基本结构是rule,其由三部分组
阅读全文
摘要:gcc code-editor(e.g VS Code)
阅读全文
摘要:拼接字符串, 在定义好变量之后, 输出时候的拼接, 注意无意输出一些空格 。 比如: #!/bin/bash a1="China" a2="${a1}, Japan and Korean are the three important countries in east asia. \n" a3="
阅读全文