2018年9月8日

mystrcat

摘要: #include char * strcat(char *strDest,const char * strSrc) { char *r=strDest; char *p=strDest; while(*p++ != '\0'); p--; while(*strSrc != '\0') { *p++ = *strSrc++; } *p = '\0'; return r; } int m... 阅读全文

posted @ 2018-09-08 14:17 紫枫术河 阅读(163) 评论(0) 推荐(0)

mystrlen

摘要: #include int mystrlen(const char *str) { int n=0; const char *p = str; while(*p++ != '\0') { n++; } return n; } int main() { char str1[100] = {'\0'}; int ret = 0; puts("please intput... 阅读全文

posted @ 2018-09-08 14:17 紫枫术河 阅读(296) 评论(0) 推荐(0)

mystrcmp

摘要: #include int mystrcmp(const char *str1,const char * str2) { int ret = 0; while(1) { ret = *str1 - *str2; if((ret != 0)||(*str1 == '\0')) { break; } str1++; str2++; } return ret... 阅读全文

posted @ 2018-09-08 14:15 紫枫术河 阅读(345) 评论(0) 推荐(0)

指针理解

摘要: #include<stdio.h>#include<math.h> int main(){ int sum1[10]={1,2,3,4,5,6,7,8,9,10}; int sum2[2][3]={{1,2,3},{4,5,6}}; int *p1 = sum1; int (*p2)[3] = su 阅读全文

posted @ 2018-09-08 14:14 紫枫术河 阅读(187) 评论(0) 推荐(0)

vi使用

摘要: 查看文件1、cat -s 合并多项空行为一行 -b 显示行号2、nl 显示行号3、head 显示文件前几行4、tail 显示文件后几行 创建文件1、touch a.c 如果文件已经存在,就更新时间戳 创建文件夹1、mkdir /work/lsh/jn/001 -p -p 如果子文件夹的父亲不存在,就 阅读全文

posted @ 2018-09-08 14:13 紫枫术河 阅读(120) 评论(0) 推荐(0)

选择排序

摘要: #include #include int main() { int sum[10]={0}; int ch=0; int i=0; int j=0; int min_pos=0; int temp=0; printf("please input 10 num!\n"); for(i=0;i<10;i++) { scanf("%d",&sum[i])... 阅读全文

posted @ 2018-09-08 14:13 紫枫术河 阅读(130) 评论(0) 推荐(0)

反汇编arm-linux-objdump 就能

摘要: 最近在调试uboot的代码时,用的新版本的uboot,lowlevel_init函数里是空的,而且在链接文件中也没有发现对lowlevel_init.o的链接。 在bl lowlevel_init 之前和之中加了两个电灯,发现在bl之后的部分并没有被执行,所以想看看具体程序有没有运行这个函数。 在网 阅读全文

posted @ 2018-09-08 14:12 紫枫术河 阅读(1963) 评论(0) 推荐(0)

gdb 调试 设置core

摘要: gdb 调试 设置core在 ~/.bashrc加入一句 ulimit -c unlimited ulimit -c unlimited 调试gdb test core 阅读全文

posted @ 2018-09-08 14:10 紫枫术河 阅读(205) 评论(0) 推荐(0)

查看应用程序调用哪些库

摘要: 语法 选项 参数 其他介绍 首先ldd不是一个可执行程序,而只是一个shell脚本 ldd能够显示可执行模块的dependency,其原理是通过设置一系列的环境变量,如下:LD_TRACE_LOADED_OBJECTS、LD_WARN、LD_BIND_NOW、LD_LIBRARY_VERSION、L 阅读全文

posted @ 2018-09-08 14:04 紫枫术河 阅读(1183) 评论(0) 推荐(0)

查看文件大小、存储容量

摘要: du -smh ls -lh 阅读全文

posted @ 2018-09-08 14:01 紫枫术河 阅读(187) 评论(0) 推荐(0)

电脑端开启ntp服务器

摘要: 一、电脑端开启ntp服务器 Gpedit,组测略 二、电脑先于网络服务器同步 三、测试电脑的ntp服务器是否正常 (一) 在电能质量使用ntpdate命令与电脑进行授时 ntpdate 192.168.1.101 打印如下语句即成功 (二)同步硬件时钟 hwclock -w 阅读全文

posted @ 2018-09-08 14:00 紫枫术河 阅读(2495) 评论(0) 推荐(0)

网卡性能测试

摘要: 网卡性能测试 上行吞吐量测试 PC端 iperf3.exe -s -i 1 -p 5200 ※参数说明:-s 作为服务端 , -u 进行udp测试 , -p [port] 为端口号,-i 1 为每1秒打印一次结果 Client udp测试 iperf -u -c 192.168.1.101 -t 9 阅读全文

posted @ 2018-09-08 13:55 紫枫术河 阅读(4245) 评论(0) 推荐(0)

Linux 查看串口配置 去除回显

摘要: stty设置串口参数 stty -F /dev/ttyO3 ispeed 115200 ospeed 115200 cs8 Linux 查看串口配置 Stty -F /dev/ttyUSB0 去掉串口回显 Stty -F /dev/ttyUSB0 -echo 监控串口数据接收 Cat /dev/tt 阅读全文

posted @ 2018-09-08 13:54 紫枫术河 阅读(4708) 评论(1) 推荐(0)

linux核心板抓包工具

摘要: 核心板抓包工具 tcpdump -n -i eth1 host 192.168.2.101 阅读全文

posted @ 2018-09-08 13:53 紫枫术河 阅读(165) 评论(0) 推荐(0)

编写systemd下服务脚本

摘要: 编写systemd下服务脚本 一、在/lib/systemd/system目录下建立服务脚本 sshd.service 必须以service结尾 二、填写内容 [Unit] Description=SSH Key Generation [Service] Type=oneshot RemainAft 阅读全文

posted @ 2018-09-08 13:45 紫枫术河 阅读(243) 评论(0) 推荐(0)

Git使用

摘要: 一、源码下载 git clone //SrcSvr-001/SourceCode/dzhcpx4 二、git配置(第一次下载代码后,必须做) 外层git 内层git 三、源码编译 四、提交修改(内层git) 五、提交修改(外层git) 注:如果更改的内容要提交到服务器(提交之前,本地用户要先于同事的 阅读全文

posted @ 2018-09-08 13:44 紫枫术河 阅读(133) 评论(0) 推荐(0)

Gitlab 安装

摘要: 一、Gitlab 安装 git clone https://github.com/PX4/Firmware.git 一、安装ssh服务 ps -e|grep ssh sudo apt-get install openssh-server sudo /etc/init.d/ssh start 二、设置 阅读全文

posted @ 2018-09-08 13:43 紫枫术河 阅读(245) 评论(0) 推荐(0)

s3c-rtc 子系统分析

摘要: //s3c-rtc 子系统分析//刘术河2016.08.25 //这里先从驱动层入手\linux-2.6.39-at91-2016.08.11-lsh\drivers\rtc\Rtc-s3c.c1.从rtc层入手看rtc驱动框架static struct platform_driver s3c_rt 阅读全文

posted @ 2018-09-08 13:42 紫枫术河 阅读(234) 评论(0) 推荐(0)

分析ntp调用过程

摘要: //分析ntp调用过程//刘术河 2016.08.17 Ntp-keygen.c (util):main(Ntpd.c (ntpd):main(Ntpd.c (ntpd):main(Ntpdate.c (ntpdate):main(Ntpdc.c (ntpdc):main(Ntpq.c (ntpq) 阅读全文

posted @ 2018-09-08 13:42 紫枫术河 阅读(896) 评论(0) 推荐(0)

ntp 看看打印命令

摘要: mount -t nfs -o nolock 192.168.1.115:/work/9x5/ntp /mnt cd /mnt/arm/6p5/bin/ cp ntpd /usr/sbin sync /etc/rc.d/init.d/xntpd restart rm /var/log/ntp.log 阅读全文

posted @ 2018-09-08 13:41 紫枫术河 阅读(180) 评论(0) 推荐(0)

导航