随笔分类 - Linux
摘要:select select() 确定一个或多个套接口的状态,如:需要则等待。 #include <winsock.h> int PASCAL FAR select( int nfds, fd_set FAR* readfds, fd_set FAR* writefds, fd_set FAR* ex
阅读全文
摘要:#include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.
阅读全文
摘要:#include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netdb.h> #i
阅读全文
摘要:t-get是一个简单的命令行BT下载工具,可以用于BT种子和磁力链接的下载 tget使用Nodejs开发,基于 torrent-stream ,代码量很少 npm install -g t-get 磁力链接的下载: tget 'magnet:?xt=urn:btih:0403fb4728bd788f
阅读全文
摘要:Bootloader:比如U-Boot,vivi等,通常用纯汇编或混编开发而成,其主要作用是初始化硬件设备,加载操作系统内核 操作系统内核(Kernel):内存管理,进程管理,网络系统,挂载根文件系统等等 执行init进程 根文件系统(RootFS):配置文件,系统文件等等 启动第一步--加载BIO
阅读全文
摘要:init模块 一般来说,Linux程序只能用另一个Linux程序启动。例如,登录Linux终端程序Mingetty。 但终端程序又由谁启动呢?在计算机上启动Linux时,内核装入并启动init程序。然后init程序装载硬盘和启动终端程序。登录终端程序时,它启动命令行界面Shell。在计算机上启动Li
阅读全文
摘要:system("touch dj.txt"); system("chattr +i dj.txt"); system("mkdir dj"); system("chattr +a dj");
阅读全文
摘要:163yum源: 1)备份当前yum源防止出现意外还可以还原回来 cd /etc/yum.repos.d/ cp /CentOS-Base.repo /CentOS-Base-repo.bak 2)使用wget下载163yum源repo文件 wget http://mirrors.163.com/.
阅读全文
摘要:## 查看内存占用 #CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 #内存消耗最多的前10个进程 ps auxw|head -1;ps auxw|sort -rn -k4|head -10 #虚拟内存使用最多的前10个进程
阅读全文
摘要:原文: https://gist.github.com/berkorbay/6feda478a00b0432d13f1fc0a50467f1 sudo wget https://github.com/shiftkey/desktop/releases/download/release-3.1.1-l
阅读全文