随笔分类 -  linux cmd and shell

linux命令
摘要:astyle使用基础教程 http://cppblog.com/jokes000/articles/158838.html steps: (1) apt-get install astyle 或者去主页http://sourceforge.net/projects/astyle下载 (2) asty 阅读全文
posted @ 2016-12-02 11:31 oucaijun 阅读(1073) 评论(0) 推荐(0) 编辑
摘要:1. shell监控网卡状态,故障时自动重启网卡 http://blog.slogra.com/post-425.html cat fix_eth0.sh 阅读全文
posted @ 2016-11-14 11:40 oucaijun 阅读(957) 评论(0) 推荐(0) 编辑
摘要:#include <QCoreApplication>#include <QDebug>#include <QTextStream>#include <QDir>#include <QFile>#include <QList>#include <QThread>#include <QtNetwork 阅读全文
posted @ 2016-11-14 11:34 oucaijun 阅读(480) 评论(0) 推荐(0) 编辑
摘要:每天一个linux命令(41):ps命令 http://www.cnblogs.com/peida/archive/2012/12/19/2824418.html Linux中的ps命令是Process Status的缩写。ps命令用来列出系统中当前运行的那些进程。ps命令列出的是当前那些进程的快照 阅读全文
posted @ 2016-10-13 09:53 oucaijun 阅读(444) 评论(0) 推荐(0) 编辑
摘要:linux 查看系统信息命令(比较全) http://blog.csdn.net/lhf_tiger/article/details/7102753 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/ 阅读全文
posted @ 2016-09-02 22:35 oucaijun 阅读(322) 评论(0) 推荐(0) 编辑
摘要:每天一个linux命令:netstat http://www.cnblogs.com/peida/archive/2013/03/08/2949194.html netstat命令用于显示与IP、TCP、UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况。netstat是在内核 阅读全文
posted @ 2016-07-29 12:00 oucaijun 阅读(306) 评论(0) 推荐(0) 编辑
摘要:搜索代码中出现CONFIG_BOOTARGS的行,但又不希望有#define和#undef, 暂时不知带如何直接用一个语句做到,因此用了如下三个语句. find . -type f | xargs grep CONFIG_BOOTARGS > result.log; sed -i '/#define 阅读全文
posted @ 2016-07-12 15:23 oucaijun 阅读(4892) 评论(0) 推荐(0) 编辑
摘要:Usage: rsync [OPTION]... SRC [SRC]... DEST or rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST or r 阅读全文
posted @ 2016-07-04 15:38 oucaijun 阅读(3259) 评论(0) 推荐(0) 编辑
摘要:一. 针对单文件的patch: 我们以mkprj.sh.1和mkprj.sh两个文件为例: [root@localhost tst]# lsmkprj.sh.1 mkprj.sh 看两个文件的差异:[root@localhost tst]# diff mkprj.sh mkprj.sh.1 20,2 阅读全文
posted @ 2016-07-03 00:32 oucaijun 阅读(460) 评论(0) 推荐(0) 编辑
摘要:实例: cat etc/init.d/monitor-app.sh 一个app启动脚本: cat etc/init.d/automhclient 阅读全文
posted @ 2016-06-03 13:01 oucaijun 阅读(1591) 评论(0) 推荐(0) 编辑
摘要:使用Shell脚本实现ftp的自动上传下载 http://liwenge.iteye.com/blog/566515 1. ftp自动登录批量下载文件。 #####从ftp服务器上的/home/data 到 本地的/home/databackup#### #!/bin/bash ftp -n<<! 阅读全文
posted @ 2016-05-30 16:04 oucaijun 阅读(1204) 评论(0) 推荐(0) 编辑
摘要:linux TOP命令各参数详解【转载】 http://www.cnblogs.com/sbaicl/articles/2752068.html 阅读全文
posted @ 2016-04-12 16:43 oucaijun 阅读(176) 评论(0) 推荐(0) 编辑
摘要:1. 使用dd命令制作烧写文件 环境: bootargs=mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:512K(boot),3M(kernel),2560K(rootfs),1 阅读全文
posted @ 2016-03-16 10:11 oucaijun 阅读(4814) 评论(0) 推荐(0) 编辑
摘要:linux下解压命令大全 .tar 解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)———————————————.gz解压1:gunzip FileName.gz解压2:gzip -d FileName.g 阅读全文
posted @ 2016-03-14 16:38 oucaijun 阅读(827) 评论(0) 推荐(0) 编辑
摘要:每天一个linux命令(35):ln 命令 实例1:给文件创建软链接 命令: ln -s log2013.log link2013 输出: [root@localhost test]# ll -rw-r--r-- 1 root bin 61 11-13 06:03 log2013.log [root 阅读全文
posted @ 2016-03-04 10:29 oucaijun 阅读(314) 评论(0) 推荐(0) 编辑
摘要:查看进程 ps -aux | grep appname 杀死进程 kill pid 查看端口: netstat -ap | grep 端口号 netstat -ap | grep 进程名字 lsof -i:端口号 例子:server这个程序会开启8888这个端口。 root@ubuntu:/mnt/ 阅读全文
posted @ 2016-02-19 13:29 oucaijun 阅读(628) 评论(0) 推荐(0) 编辑
摘要:touch auth.log root@ubuntu:/work# ls -l auth.log -rw-r--r-- 1 root root 0 Feb 18 19:27 auth.log chown syslog.adm auth.log root@ubuntu:/work# ls -l aut 阅读全文
posted @ 2016-02-19 11:29 oucaijun 阅读(205) 评论(0) 推荐(0) 编辑
摘要:iconv 文件编码转换 http://www.cnblogs.com/xuxm2007/archive/2010/11/09/1872379.html 查看iconv的支持的编码: $ iconv -l 在LINUX上进行编码转换时,可以利用iconv命令实现,这是针对文件的,即将指定文件从一种编 阅读全文
posted @ 2016-02-16 10:37 oucaijun 阅读(386) 评论(0) 推荐(0) 编辑
摘要:mount使用示例:#mkdir -p /mnt/usbhd1注:建立目录用来作挂接点(mount point)#mount -t ntfs /dev/sdc1 /mnt/usbhd1(-t ntfs )是可选项。1. man mount:SYNOPSIS mount [-lhV] ... 阅读全文
posted @ 2016-01-21 14:03 oucaijun 阅读(273) 评论(0) 推荐(0) 编辑
摘要:tree命令的c语言实现. 阅读全文
posted @ 2015-12-09 14:02 oucaijun 阅读(1603) 评论(0) 推荐(0) 编辑

下载TeamViewer完整版 下载TeamViewer
点击右上角即可分享
微信分享提示