标签 库函数 下的文章

  • 📂库函数与Linux系统API教程

    1 文件IOopen() close() read() write() lseek()等系统调用函数的使用,在Linux系统调用函数里都是使用文件描述符来操作文件,只有在用open函数打开文件的时候使用了文件名,然后返回了文件描述符用于其它函数操作文件。open() #include <sys/types.h> #include <sys/stat.h> #inc...

  • 📂s9 Linux 进程管理命令教程

    9.1 ps:查看进程9.2-3 pstree & pgrep9.4-6 kill & killall & pkill9.7 top:实时显示系统中各个进程的资源占用状况9.8-9 nice & renice9.10 nohup:用户退出系统进程继续工作9.11 strace:跟踪进程的系统调用 、ltrace:跟踪进程调用库函数9.13-15 runlevel & init & service

  • 📂【Linux】文件管理系统解析(I/O与缓冲区,文件描述符fd,iNode)教程

    目录0.前言1.文件1.1如何理解文件?1.1 文件构成1.2 文件有哪些2.文件操作2.1 C语言文件操作2.2 系统调用文件操作2.3 两种操作的关系3.文件描述符fd3.1 什么是文件描述符?3.2 为什么有文件描述符?3.3 fd使用之重定向4. I/O与缓冲区4.1 是什么?4.2 为什么?4.3 使用方法与注意事项5. 文件管理系统5.1 文件系统是什么5.2 为什么需要文件系统...

  • 📂退出进程 替换接口教程

    退出进程:1.main函数中return;2. 2.库函数exit; 3.系统调用接口_exit;perror:strerror:获取系统错误原因;替换:**加载一个新的程序到内存中,更新当前进程的页表映射信息到新的程序上,初始化页表,初始化虚拟地址空间。 希望子进程能完成一个新的任务。多进程更加稳定。**替换接口:系统调用接口:execve库函数:execl/execlp/execle/...

  • 📂Windows库函数获取 可执行程序所在路径教程

    头文件#include <Windows.h> 函数函数已经写好了std::string get_executable_dir_() { char path[255] = { 0 }; GetModuleFileName(NULL, path, 255); (strrchr(path, '\\'))[1] ...

  • 📂内存操作库函数memcpy()教程

    描述C 库函数 void *memcpy(void *str1, const void *str2, size\_t n) 从存储区 str2 复制 n 个字节到存储区 str1。声明下面是 memcpy() 函数的声明。<pre class="prettyprint prettyprinted">void *memcpy(void *str1, const ...

  • 📂linux中的文件IO笔记 3教程

    3.1.11 文件描述符的复制1 1、dup和dup2函数介绍 #include <unistd.h>int dup(int oldfd); int dup2(int oldfd, int newfd);#define \_GNU\_SOURCE #include <fcntl.h>...

  • 📂linux man 1,2,3 命令教程

    转自:https://www.cnblogs.com/oxspirt/p/8137675.htmllinux man 1,2,3 命令原文: http://blog.sina.com.cn/s/blog\_969c52730101c0p7.html---------------------------------------------------Linux的man很强大,该手册分成很多se...