[小结]常用shell命令功能小结
来源:互联网 发布:火锅店点莱软件 编辑:程序博客网 时间:2024/06/05 22:52
1.如何快速查看当前时间?
Date -R
2.快速获取insmod的驱动模块的主设备号?
awk ' $2=="misc" {print $1} ' /proc/devices
awk命令的使用参考: http://www.cnblogs.com/repository/archive/2011/05/13/2045927.html
awk ' 模板 {action} ' 文件
3.截取本地IP的命令:
"ifconfig eth0 | grep inet | cut -d: -f2 | cut -d' ' -f1 > /tmp/ipaddr.txt"
cut的使用:http://www.cnblogs.com/dong008259/archive/2011/12/09/2282679.html
4.如何查看某一命令的调用时间?
time -p grep -rn "SigOut" ./ > /dev/null
5.批量处理,某个目录下,指定类型文件的,字符串替换?
参考:http://blog.163.com/daniel_ao/blog/static/1100988432010722642551/
http://blog.163.com/lgh_2002/blog/static/4401752620098115317822/
比如如何替换 CTRL目录下,cpp文件中,的
grep "abc" * -R | awk -F: '{print $1}' | sort | uniq | xargs sed -i 's/abc/abcde/g'
serdes_reg_get_bychannel --> serdes_reg_get
serdes_reg_set_bychannel --> serdes_reg_set
sed -i "s/serdes_reg_set_bychannel/serdes_reg_set/g" 'grep -rl --include=*.cpp "serdes_reg_set_bychannel" . '
grep --include=*.cpp "serdes_reg_set_bychannel" * -R | awk -F: '{print $1}' | sort | uniq | xargs sed -i 's/serdes_reg_set_bychannel/serdes_reg_set/g'
6.查看编译器的调用头文件路径,库等等问参数?
参考:http://www.tuicool.com/articles/AbyeimN
ehco 'main(){}' | gcc -E -v -
ehco 'main(){}' | arm-linux-gcc -E -v -
- [小结]常用shell命令功能小结
- vi命令常用功能小结
- Linux常用shell命令(学习小结)
- SHELL常用编程小结
- 使用shell命令小结
- ps常用功能小结
- 常用BSC命令小结
- 常用Linux命令小结
- 常用yum命令小结
- android abd shell 命令小结
- shell 命令小结1 201406
- hive的shell命令小结
- VB常用功能函数小结
- map 容器常用功能小结
- python入门常用功能小结
- 嵌入式 AT命令常用小结
- ubuntu 命令小结(常用)
- Shell小结
- Android Service学习之IntentService 深入分析(附码源分析)
- java字符串反转总结
- Xcode 去掉local git
- C#DataTable添加值
- 把无线网卡设置成wifi热点
- [小结]常用shell命令功能小结
- 数据结构学习笔记(9.栈和队列的特殊实现)
- mysql 区分大小写查询
- python with 简单示例
- HttpInvoker SSL双向认证远程接口调用
- 解决Win7 64bit + VS2010 使用opencv时出现提“应用程序无法正常启动(0xc000007b)”错误
- Android Fragment 基本介绍
- UIView视图在IB中创建的理解
- mongodb启动与关闭