
Linux
amwha
跟着感觉走
展开
-
tar命令
tar使用原创 2022-10-17 13:34:48 · 1129 阅读 · 0 评论 -
如何判断linux库编译时是否带-g参数
https://stackoverflow.com/questions/1999654/how-can-i-tell-if-a-library-was-compiled-with-g原创 2021-07-05 17:19:53 · 449 阅读 · 0 评论 -
linux 查看库所适应的平台
1、动态库(fast)file xxxx.so.1file 命令只对动态库有效,2、动态与静态库readelf -h xxxx.areadelf 对动态与静态库都有效原创 2021-07-05 16:47:09 · 817 阅读 · 0 评论 -
shell 字符串查找与替换
sed -i 's/Search_String/Replacement_String/g' targetfile原创 2021-06-28 18:11:56 · 700 阅读 · 0 评论 -
shell 增加环境变更
# 增加环境变量ENV_PATH=":/usr/sbin"result=$(echo $PATH | grep "${ENV_PATH}")if [[ "$result" != "" ]];then echo "has path"else echo "don't have path" export PATH=$PATH$ENV_PATHfi原创 2021-06-28 17:52:12 · 143 阅读 · 0 评论 -
shell脚本判断程序是否启动
#!/bin/bash./MyApp&# 根据情况调整sleep 3result=$(ps -aux | grep MyApp | wc -l)# 使用$(xxx)得到指令执行的结果,# 变量定义时等号两边不要有空格echo $result# if空格[[空格$result空格-gt空格1]];thenif [[ $result -gt 1 ]];then echo "program start sucessed"else echo "原创 2021-06-28 17:13:27 · 3662 阅读 · 0 评论 -
linux下coredump使用gdb定位bug
前提是保证运行环境里有gdb,而且开发环境里有gcc编译器1、 使能coredump生成的coredump文件的大小是可以设置的,这里使用 unlimited 不限制,如果设置成0,则功能没有开启,不生成dump文件可以使用如下命令来改变大小,一般不要设置太大,如果dump多次文件会很大,导致磁盘空间不够用ulimit -C 10242、设置dump文件生成的路径这里我们把生成路径设置到了源码目录,文件名是:core.xxxxxxx。3、 编一段有问题的代码出问题的在第7行4 、编原创 2021-06-10 23:10:13 · 462 阅读 · 1 评论 -
linux下运行程序时无法找到库
问题./test: error while loading shared libraries: libcyusbserial.so: cannot open shared object file: No such file or directory 解决方案一# echo “/home/root/workspace/cyusblib” >> /etc/ld.so.conf # 把库的路径添加到ld.so.conf文件末尾# ldconfig # 使之生效解决方案二:配置 LD_原创 2021-03-22 10:43:51 · 367 阅读 · 0 评论 -
linux系统 更改关机等待时间
改变 /etc/systemd/system.conf 中的DefaultTimeoutStopSec#/bin/shecho "config shutdown time"CONFIG_PARA='#DefaultTimeoutStopSec=90s/DefaultTimeoutStopSec=10s'echo password| sudo -S sed -i s/$CONFIG_PARA/ /etc/systemd/system.conf原创 2021-03-22 10:32:47 · 740 阅读 · 0 评论 -
windows与ubuntu虚拟机之间TFTP文件传输
1、 目标实现 win7下安装的虚拟机ubuntu 14.04之间的文件传输。2、ubuntu 下 TFTP 安装tftpd-hpa : 服务器tftp-hpa : 客户端joey@ubuntu:~$ sudo apt-get install tftpd-hpa tftp-hpa3、ubuntu下 新建TFTP传输目录joey@ubuntu:~$ mkdir tftpboot...原创 2019-03-30 23:33:48 · 1016 阅读 · 0 评论 -
译 《Documentation/kbuild/kconfig-language.txt》
本文,不是严格的逐字翻译,来源于linux-4.1.15/Documentation/kbuild/kconfig-language.txtIntroductionThe configuration database is a collection of configuration optionsorganized in a tree structure:组织好的数据是树状结构的,像下面这...翻译 2019-01-23 09:05:37 · 1236 阅读 · 0 评论 -
查看GCC版本
查看交叉编译器的GCC版本:hedy@ubuntu:~/u-boot$ arm-poky-linux-gnueabi-gcc -v查看本地编译器的GCC版本:hedy@ubuntu:~/u-boot$ gcc -vhedy@ubuntu:~/u-boot$ which arm-poky-linux-gnueabi-gcc/opt/fsl-imx-fb/4.1.15-2.1.0/s...原创 2019-01-26 14:53:59 · 74363 阅读 · 1 评论 -
Ubuntu12.04 root 用户登录
root原创 2017-08-13 11:03:32 · 267 阅读 · 0 评论 -
嵌入式linux下去掉显示器上的光标
。。。原创 2017-12-19 15:34:53 · 3237 阅读 · 3 评论 -
双向链表
双向链表原创 2018-04-09 13:25:47 · 278 阅读 · 0 评论 -
转《Linux input子系统分析之一:软件层次》
本文转自:https://blog.youkuaiyun.com/yueqian_scut/article/details/47903853转载 2018-04-09 16:18:39 · 413 阅读 · 0 评论 -
转《Linux input子系统分析之二:深入剖析input_handler、input_core、input_device》
转自 https://blog.youkuaiyun.com/yueqian_scut/article/details/48792939转载 2018-04-09 16:25:09 · 233 阅读 · 0 评论 -
linux 内核定时器
1、初如化调用过程1、asmlinkage void __init start_kernel(void)2、void __init init_timers(void)3、void open_softirq(int nr, void (*action)(struct softirq_action *))4、static void run_timer_softirq(struct ...原创 2018-04-12 16:40:12 · 288 阅读 · 0 评论 -
linux下GPIO操作
GPIO 用户空间操作原创 2018-04-20 14:29:51 · 3495 阅读 · 8 评论 -
linux SPI 子系统
参考http://www.wowotech.net/device_model/platform_device.html原创 2018-07-06 14:15:15 · 742 阅读 · 0 评论 -
yocto环境搭建记录
1、无法安装包hedy@ubuntu:~$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essentialReading package lists... DoneBuilding dependency tree Reading state informati...原创 2018-12-20 16:07:44 · 4486 阅读 · 0 评论 -
Vim使用
vim使用原创 2017-08-02 23:05:22 · 245 阅读 · 0 评论