linux
文章平均质量分 87
Corwin, S
这个作者很懒,什么都没留下…
展开
-
C语言类型转换常用函数
最近工作中经常需要字符串和int、long、long long int, 也有无符号字符串和unsigned int 相关的转化,整理了如下相关的:char* 字符串转换intint atoi(const char* nptr);char* 字符串转换longlong atol(const char* nptr);char* 字符串转换long longlong long atoll(const char *nptr);char* 字符串转换doubledouble atof(con原创 2021-05-18 18:15:39 · 2482 阅读 · 0 评论 -
linux 下查看某一进程的cpu使用率和这个线程中各个线程的cpu使用率
在Ubuntu/CentOS等linux系统中, 在调试程序过程中,有时需要查看程序的CPU的使用率和程序的各个进程的使用率.那么首先需要获取这个进程的PID:ps -ef|grep [process name]然后查看该进程的CPU:top -p [PID]查看这个进程的各个进程的CPU:top -H -p [PID] ...原创 2018-09-06 15:07:34 · 14259 阅读 · 0 评论 -
linux机器上不能查看到pthread所有模块比如(mutex, cond)的解决办法
在编码过程中总会需要查看一些接口,及相关的使用的规则和接口参数注意事项,但是在有些linux 系统安装会发现man 命令查不到了比如: man pthread_mutex_initNo manual entry for pthread_mutex_init那么怎么办呢?究其原因是manpages 不是最新的我们需要跟新到最新的sudo apt-get install g...原创 2018-09-18 17:19:30 · 900 阅读 · 0 评论 -
在Ubuntu14.04不能添加PPA源到apt源的问题解决方法
在Ubuntu14.04使用apt-get 更新Git 时,需要更新apt源,添加一个带有最新Git的源,如下命令:$ sudo add-apt-repository ppa:git-core/ppaCannot add PPA: 'ppa:~git-core/ubuntu/ppa'.ERROR: '~git-core' user or team does not exist.出...原创 2018-11-08 14:29:03 · 10522 阅读 · 1 评论 -
C++程序在Linux下调试一些工具
1, ldd工具ldd -r *so/bin可以查看有些符号缺少和依赖的其他库2.nm格式:nm [options] file 功能:列出file中的所有符号参数: -C 将符号转化为用户级的名字 -s 当用于.a文件即静态库时,输出把符号名映射到定义该符号的模块或成员名的索引 -u 显示在file外定义的符号或没有定义的符号...原创 2019-02-28 14:46:45 · 1044 阅读 · 0 评论 -
Vim 个性化配置管理插件方式
vim-plug plugin manager how to use vim-plug plugin manager 怎样使用vim-plug 插件管理器?bundle plugin manager Vundle for beginner - Vim plugins manager VIM Vundle...原创 2019-05-15 17:04:01 · 117 阅读 · 0 评论 -
Linux 终端命令行使用script命令行录制和scriptreplaym命令行录制文件回放
命令行录制script先看script用哪些参数:timing data 被写入标准错误输出或者指定文件。 $ script --timing=timefile actionfile或者: $ script -t actionfile 2> timefile录制文件回放scriptreplay使用 $ ...原创 2019-07-19 15:02:09 · 440 阅读 · 0 评论