Linux
amwha
跟着感觉走
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
tar命令
tar使用原创 2022-10-17 13:34:48 · 1273 阅读 · 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 · 526 阅读 · 0 评论 -
linux 查看库所适应的平台
1、动态库(fast) file xxxx.so.1 file 命令只对动态库有效, 2、动态与静态库 readelf -h xxxx.a readelf 对动态与静态库都有效原创 2021-07-05 16:47:09 · 972 阅读 · 0 评论 -
shell 字符串查找与替换
sed -i 's/Search_String/Replacement_String/g' targetfile原创 2021-06-28 18:11:56 · 757 阅读 · 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_PATH fi原创 2021-06-28 17:52:12 · 198 阅读 · 0 评论 -
shell脚本判断程序是否启动
#!/bin/bash ./MyApp& # 根据情况调整 sleep 3 result=$(ps -aux | grep MyApp | wc -l) # 使用$(xxx)得到指令执行的结果, # 变量定义时等号两边不要有空格 echo $result # if空格[[空格$result空格-gt空格1]];then if [[ $result -gt 1 ]];then echo "program start sucessed" else echo "原创 2021-06-28 17:13:27 · 3773 阅读 · 0 评论 -
linux下coredump使用gdb定位bug
前提是保证运行环境里有gdb,而且开发环境里有gcc编译器 1、 使能coredump 生成的coredump文件的大小是可以设置的,这里使用 unlimited 不限制,如果设置成0,则功能没有开启,不生成dump文件 可以使用如下命令来改变大小,一般不要设置太大,如果dump多次文件会很大,导致磁盘空间不够用 ulimit -C 1024 2、设置dump文件生成的路径 这里我们把生成路径设置到了源码目录,文件名是:core.xxxxxxx。 3、 编一段有问题的代码 出问题的在第7行 4 、编原创 2021-06-10 23:10:13 · 551 阅读 · 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 · 468 阅读 · 0 评论 -
linux系统 更改关机等待时间
改变 /etc/systemd/system.conf 中的DefaultTimeoutStopSec #/bin/sh echo "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 · 910 阅读 · 0 评论 -
译 《Documentation/kbuild/kconfig-language.txt》
本文,不是严格的逐字翻译,来源于linux-4.1.15/Documentation/kbuild/kconfig-language.txt Introduction The configuration database is a collection of configuration options organized in a tree structure: 组织好的数据是树状结构的,像下面这...翻译 2019-01-23 09:05:37 · 1352 阅读 · 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-hpa 3、ubuntu下 新建TFTP传输目录 joey@ubuntu:~$ mkdir tftpboot...原创 2019-03-30 23:33:48 · 1092 阅读 · 0 评论 -
Vim使用
vim使用原创 2017-08-02 23:05:22 · 296 阅读 · 0 评论 -
查看GCC版本
查看交叉编译器的GCC版本: hedy@ubuntu:~/u-boot$ arm-poky-linux-gnueabi-gcc -v 查看本地编译器的GCC版本: hedy@ubuntu:~/u-boot$ gcc -v hedy@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 · 74709 阅读 · 1 评论 -
yocto环境搭建记录
1、无法安装包 hedy@ubuntu:~$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential Reading package lists... Done Building dependency tree Reading state informati...原创 2018-12-20 16:07:44 · 4745 阅读 · 0 评论 -
linux SPI 子系统
参考 http://www.wowotech.net/device_model/platform_device.html原创 2018-07-06 14:15:15 · 867 阅读 · 0 评论 -
linux下GPIO操作
GPIO 用户空间操作原创 2018-04-20 14:29:51 · 3619 阅读 · 8 评论 -
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 · 339 阅读 · 0 评论 -
转《Linux input子系统分析之二:深入剖析input_handler、input_core、input_device》
转自 https://blog.youkuaiyun.com/yueqian_scut/article/details/48792939转载 2018-04-09 16:25:09 · 293 阅读 · 0 评论 -
转《Linux input子系统分析之一:软件层次》
本文转自:https://blog.youkuaiyun.com/yueqian_scut/article/details/47903853转载 2018-04-09 16:18:39 · 461 阅读 · 0 评论 -
双向链表
双向链表原创 2018-04-09 13:25:47 · 354 阅读 · 0 评论 -
嵌入式linux下去掉显示器上的光标
。。。原创 2017-12-19 15:34:53 · 3474 阅读 · 3 评论 -
Ubuntu12.04 root 用户登录
root原创 2017-08-13 11:03:32 · 323 阅读 · 0 评论
分享