自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 资源 (20)
  • 收藏
  • 关注

原创 Linux 下常用的字符串 处理命令 记录 awk sed cut grep wc shell

1. awk 详细参数说明 awk '{print $3,$4}' /proc/net/arp 把arp文件的第三行和第四行,打印出来,可以重定向到文件root@OpenWrt:/tmp# awk '{print $3,$4}' /proc/net/arp >/tmp/net_arp_listroot@OpenWrt:/tmp# cat net_arp_list HW type...

2018-05-07 15:19:16 475 1

原创 linux c 创建线程 每隔2分钟,去check一个文件,若该文件大小大于1024k,删除文件

可以通过 pthread_create()函数创建新线程。#include <pthread.h>int pthread_create(pthread_t *restrict tidp, const pthread_attr_t *restrict attr, ...

2018-05-25 15:23:36 302

原创 dmesg 总结 iwpriv ra0 show stacountinfo

dmesg 可将mtk平台的iwpriv的一些命令的输出没有在用户态。使用的是printk打印。若想获取到打印信息,常用的两种方法。 1.使用ioctl,copy到user态 2.使用dmesg。 a.类似 dmesg -c 先把dmesg的buf清空。 b.然后执行iwpriv ra0 show stacountinfo 打印信息会保存到dmesg的buf里面(这个时候可以dm...

2018-05-22 17:19:09 1514 2

原创 shell

l3filter_num=`iptables -L -t filter --line | grep -A 10 "FORWARD" | grep "L3FILTER" | cut -c 1-3 ` echo "$SH_NAME l3filter_num:$l3filter_num" > /dev/kmsg if [ "$l3filter_num" != ...

2018-05-18 16:35:00 88

原创 [openwrt] firewall

root@OpenWrt:/etc/config# ls4g dataUsageCfg network8192eeshare dhcp qos8192eewpa dropbear remoteupgradeAPNProf...

2018-05-16 11:30:38 400

原创 C 字符串转大小写strupr , strlowr, tolower, toupper

转大写char *strupr(char *str){ char *orign=str; for (; *str!='\0'; str++) *str = toupper(*str); return orign;}转小写char *strlowr(char *str){ char *orign=str; for (; *str...

2018-05-14 15:41:15 23134 1

原创 fread fgets feof 读文件到buf里面

从dhcp.leases读文件,每次读一行,fgets,写到dst_dhcp_list指向的buf里面。feof(fp)有两个返回值:如果遇到文件结束,函数feof(fp)的值为非零值,否则为0。int conf_get_dhcp_list1_new(char* dst_dhcp_list){ FILE *f=NULL; if ((f = fopen("/tmp/dhc...

2018-05-09 14:54:18 501

原创 C 语言 查看文件,文件夹是否存在 access,opendir

int is_dir_exist(const char *dir_path){ if(dir_path == NULL) { return -1; } if(opendir(dir_path) == NULL) { return -1; } return 0;}在头文件unistd.h中的预定义...

2018-05-09 11:16:34 722

原创 du命令 查看当前文件夹,大小

du -h openwrt7621/ | tail -n 1du命令也是查看使用空间的,但是与df命令不同的是Linux du命令是对文件和目录磁盘使用的空间的查看,还是和df命令有一些区别的。-a或-all 显示目录中个别文件的大小。 -b或-bytes 显示目录或文件大小时,以byte为单位。 -c或–total 除了显示个别目录或文件的大小外,同时也显示所有目录或文件的总和。 ...

2018-05-09 10:03:34 3023

原创 把TortoiseSVN中默认的文件比较工具替换为Beyond Compare

1.打开TortoiseSVN的配置:2.Settings->Diff Viewer 把默认的 TortoiseMerge换成External,然后再设置为BeyondCompare。3.TortoiseSVNDiffSelect Settings from Explorer’s TortoiseSVN submenu.Switch to the Diff ...

2018-05-09 09:54:06 1219 1

原创 grep -A -B -C

-A -B -C 后面都跟阿拉伯数字 -A是显示匹配后和它后面的n行。 -B是显示匹配行和它前面的n行。 -C是匹配行和它前后各n行。 总体来说,-C覆盖面最大。用它保险些。哈哈。这3个开关都是关于匹配行的上下文的(context)。于是 grep -A 4 wikipedia 密码文件.txt 就是搜索密码文件,找到匹配“wikipedia”字串的行,显示该行后后面紧跟的4...

2018-05-08 15:46:00 82096 4

原创 openwrt如何编译

Compile1.download && install feedscd trunk/base;./scripts/feeds update -a ./scripts/feeds install -a 2.download default config:cd trunk/basecat ../cusconfig/diffconfig > .configma...

2018-05-08 15:29:00 300

原创 svn

查看本机和服务器,有啥不同。类似于git statussvn st -qlbo@donglebuild2:~/work/code/test/openwrt7621/trunk/base$ svn st -qM package/ramips/appcustom/confapp/src/main.cM package/ramips/ui/luci-mtk/src...

2018-05-08 14:43:17 153

原创 cprintf

#define cprintf(fmt, args...) do { \ FILE *fp = fopen("/dev/console", "w"); \ if (fp) { \ fprintf(fp, fmt , ## args); \ fclose(fp); \ } \} while (0)

2018-05-08 13:08:30 256

原创 aaaaaaaaaa

json_object *parse_dhcp_list_2json(char* src_str,int index,json_object *rsp_dhcp_list_json){ char *delim=" "; char mac[64] = {0} ; char *p; char *q; int type; char *one ="1";...

2018-05-07 17:13:02 237

原创 Linux C语言调用system命令并获取命令的返回值

思路:popen打开,命令执行完后,对fp进行读取,读到output参数里面。 注意:size不要太大。一般64,128够用。用1024或者4028,会出现段错误,栈报错。 popen()可以执行shell命令,并读取此命令的返回值;   popen()函数通过创建一个管道,调用fork()产生一个子进程,执行一个shell以运行命令来开启一个进程。可以通过这个管道执行标准输入输出操作。这个...

2018-05-07 16:25:58 13387

原创 openwrt 显示客户端client 连接的信息 /proc/net/arp /tmp/dhcp.leases

显示当前路由器上,client的name,ip,mac,connect_type信息有两种方式:来自链接 一。通过DHCP client分配列表 (缺点:client列表会根据超时时间刷新,一般超时时间为12h,) 二。通过arp缓存列表/proc/net/arp(缺点:arp刷新时间默认为30s,这个时间的误差可以接受。)主要讲解第二种方法: Flags: 0x0是找不到这台主...

2018-05-07 16:03:51 8680

原创 批处理 bat 改文件后缀名

1.新建一个TXT文件,内容写如下:ren *.tmp *.jpg2.把TXT改为BAT文件后缀名。 3.把这个BAT文件放在要改后缀的文件同目录下面。 4.双击BAT文件就可以了。ren openwrt-ramips-mt7621-mt7621-squashfs-sysupgrade.bin openwrt-ramips-mt7621-mt7621-squashfs-...

2018-05-04 10:44:55 10218

QSslConfiguration的demo

QSslConfiguration的demo。linux下ARM环境下编译的qt5.13.2,编译QSslConfiguration 报错的问题分析https://blog.csdn.net/linbounconstraint/article/details/129441104?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22129441104%22%2C%22source%22%3A%22linbounconstraint%22%7D

2023-03-10

qt-creator-opensource-linux-x86_64-4.2.0.run

qt-creator-opensource-linux-x86_64-4.2.0.run 如何编译,查看 linux上安装Qt4.8.4+QtCreator4.2.0 https://blog.csdn.net/linbounconstraint/article/details/113389978

2021-01-29

qt-everywhere-opensource-src-4.8.4.tar.gz

qt 4.8.4 源码, 如何编译,查看 linux上安装Qt4.8.4+QtCreator4.2.0 https://blog.csdn.net/linbounconstraint/article/details/113389978

2021-01-29

linuxdeployqt-7-x86_64.AppImage

linuxdeployqt,在Linux下使用linuxdeployqt发布Qt程序https://github.com/probonopd/linuxdeploy,https://github.com/probonopd/linuxdeployqt/releases

2021-01-28

Qt 文件的拖放 drag - drop.zip

qt实现拖放文件到界面上,获取内容等 Qt 文件的拖放 drag - drop。该文章的demo的源码 https://blog.csdn.net/linbounconstraint/article/details/107518650

2020-07-22

TortoiseGit-2.8.0.0-64bit和中文语言包.zip

TortoiseGit-2.8.0.0-64bit和中文语言包. 包括: TortoiseGit-2.8.0.0-64bit.msi TortoiseGit-LanguagePack-2.8.0.0-64bit-zh_CN.msi

2019-10-11

Git-2.21.0-64-bit.zip

Git-2.21.0-64-bit.exe 搬运过来的的。官网:https://git-scm.com

2019-10-11

libmysql.dll

QT5.9 连接mysql的dll。 将mysql安装目录中的libmysql.dll文件拷贝到QT安装目录下的bin目录。

2019-09-29

MTK WIFI 手册 MTK_Wi-Fi_SoftAP_Software_Programming_Guide_v1.2

MTK的WIFI手册 MTK_Wi-Fi_SoftAP_Software_Programming_Guide_v1.2

2018-08-31

网站小偷工具 Teleport Ultra 中文简体破解版

Teleport Ultra 所能做的,不仅仅是离线浏览某个网页,它可以从 Internet 的任何地方抓回你想要的任何文件。 它可以在你指定的时间自动登录到你指定的网站下载你指定的内容,你还可以用它来创建某个网站的完整的镜象,作为创建你自己的网站的参考。 可以简单快速保存你所喜欢的网页,是仿制网站的利器! 如果遇到屏蔽了浏览器保存网页,那么用网页整站下载器是一种很理想的办法。 使用网页整站下载器保存网页就简单多了,软件会自动保存所有的页面,但有时候由于软件功能过于强大,会导致很多不必要的代码、图片、js文件都一并保存到网页中。

2018-05-17

自用的source insigth 配置文件

自用的source insigth 配置文件 http://blog.csdn.net/linbounconstraint/article/details/78829924 source insight的配置文件默认路径如下: C:\Users\用户名\Documents\Source Insight\Settings option – load configuration可以选择source insight使用的配置文件。 自定义快捷键: alt+F9 打开当前文件

2017-12-18

如何给Qlabel添加clicked属性Demo

Qt tips 如何给Qlabel添加clicked属性 http://blog.csdn.net/linbounconstraint/article/details/52414013

2016-09-05

Qt天气demo源码

http://blog.csdn.net/linbounconstraint/article/details/52399415

2016-09-01

qt Qt编程指南

https://lug.ustc.edu.cn/sites/qtguide/

2016-08-18

QtXlsxWriter和ActivePerl

安装说明: http://blog.csdn.net/linbounconstraint/article/details/52102503

2016-08-03

DateTimePicker:jQuery日期和时间插件

DateTimePicker:jQuery日期和时间插件 http://www.jq22.com/jquery-info332 http://blog.csdn.net/linbounconstraint/article/details/50132061

2015-12-01

使用Inno Setup打包发行软件的说明

Inno Setup 快速打包应用程序 简单 软件打包发行的使用说明 http://blog.csdn.net/linbounconstraint/article/details/48652839

2015-09-22

Inno Setup 汉化版

Inno Setup是一个免费的安装制作软件,小巧、简便、精美是其最大特点,支持pascal脚本,能快速制作出标准Windows2000风格的安装界面,足以完成一般安装任务。 使用说明: http://blog.csdn.net/linbounconstraint/article/details/48652839

2015-09-22

基于socket的一个简单的server和client

基于socket的一个简单的server和client。 有详细的注释。 使用: ./server //启动服务器 ./client 服务器IP地址 //启动客户端 服务器输入要下载的东西,即可。 http://blog.csdn.net/linbounconstraint/article/details/48524445

2015-09-20

virtual demo

http://blog.csdn.net/linbounconstraint/article/details/48324461

2015-09-09

pciscope v3.00.004.zip

APSoft PCIScope 是一个功能强大的PCI子系统查看、监测和调试工具,专为硬件爱好者,程序员,系统管理员而设计的! 带注册码,压缩包的cdkey.txt

2015-07-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除