易截截图软件、单文件、免安装、纯绿色、仅160KB

常用 Unix/Linux shell 命令

关键字: shell


转自:http://fanqiang.chinaunix.net/program/code/2006-06-27/4695.shtml
Ruby代码
删除 core 文件  
  
# find ~ -name core -exec file {} \; -exec rm -i {} \;
  
  
查看使用文件的进程  
  
# fuser -u /usr/my_application/foo
  
  
搜索字符串  
  
#grep "hello world" `find ./ -name "*" -print -exec file {} \; |grep text | cut -d ':' -f 1`
  
  
目录  
  
#alias dir='ls -Lla|grep ^d'
  
  
输出 IP 地址  
  
#ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{print $2;}' | awk -F':' '{print $2;}'
  
  
按文件长度排序  
  
#ls -l | grep ^- | sort -nr -k 5 | more
  
  
#ls -lR | grep ^- | sort -nr -k 5 | more
  
  
二进制文件中的可打印字符  
  
# strings name of binary file
  
  
一个月的最后一个星期天执行任务:  
  
18 * * * 0 [`date "+%d"
` -gt 24] && /path/to/script  
  
修改扩展名:  
  
# for f in *.abc; do mv $f `basename $f .abc`.def ; done
  
  
查看硬盘情况:(Solaris)  
  
# iostat -En
 &


相关文档:

实战Linux Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

Linux下查看系统信息的常用命令

下面这些命令在RedHat & CentOS下使用有效,其他系统没有比较过
查看CPU信息,可以显示到核
详细
#cat /proc/cpuinfo
粗略
#grep "model name" /proc/cpuinfo
查看内存
#grep MemTotal /proc/meminfo
#free
查看是32还是64位
# ls / 
#如果有lib64或这个目录,那操作系统就是64位的
#getconf LONG_BIT ......

Linux对I/O端口资源的管理

 摘要
  本文主要从内核实现的角度分析Linux 2.4.0内核IO子系统中对IO端口资源的管理的实现原理。本文是为那些想要深入分析Linux的IO子系统的读者和设备驱动程序开发人员而写的。(2002-10-08 14:14:05)
--------------------------------------------------------------------------------
By 阿开
  Copyrigh ......

Linux下怎样增加虚拟内存

 1、打开终端,切换到root用户,输入:free -m查看内存状态
[root@lxt lxt]# free -m
             total       used       free     shared    buf ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号