linux精华命令
1,用ls只列出目录 ls -F | grep /$
2.查看进程
按内存从大到小排列
ps -e -o "%C : %p : %z : %a"|sort -k5 -nr
3.按cpu利用率从大到小排列
ps -e -o "%C : %p : %z : %a"|sort -nr
4.打印说cache里的URL
grep -r -a jpg /data/cache/* | strings | grep "http:" | awk -F'http:' '{print "http:"$2;}'
5.查看http的并发请求数及其TCP连接状态:
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
6. sed -i '/Root/s/no/yes/' /etc/ssh/sshd_config sed在这个文里Root的一行,匹配Root一行,将no替换成yes.
7.1.如何杀掉mysql进程:
ps aux|grep mysql|grep -v grep|awk '{print $2}'|xargs kill -9 (从中了解到awk的用途)
killall -TERM mysqld
kill -9 `cat /usr/local/apache2/logs/httpd.pid` 试试查杀进程PID
8.显示运行3级别开启的服务:
ls /etc/rc3.d/S* |cut -c 15- (从中了解到cut的用途,截取数据)
9.如何在编写SHELL显示多个信息,用EOF
cat << EOF
+--------------------------------------------------------------+
| === Welcome to Tunoff services === |
+--------------------------------------------------------------+
EOF
10. for 的巧用(如给mysql建软链接)
cd /usr/local/mysql/bin
for i in *
do ln /usr/local/mysql/bin/$i /usr/bin/$i
done
11. 取IP地址:
ifconfig eth0 |grep "inet addr:" |awk '{print $2}'|cut -c 6- 或者
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
12.内存的大小:
free -m |grep "Mem" | awk '{print $2}'
13.
netstat -an -t | grep ":80" | grep ESTABLISHED | awk '{printf "%s %s\n",$5,$6}' | sort
15.因为同事要统计一下服务器下面所有的jpg的文件的大小,写了个shell给他来统计.原来用xargs实现,但他一次处理一部分,搞的有多个总和....,下面的命令就能解决啦.
find / -name *.jpg -exec wc -c {} \;|awk '{print $1}'|awk '{a+=$1}END{print a}'
CPU的数量(多核算多个CPU,cat /proc/cpuinfo |gr
相关文档:
Writing Linux LCD drivers
作者:JimSheng
Writing Linux LCD drivers
Abstract
1 LCD Module\Driver\Controller
2 Linux Frame Buffer Driver
2.1 Why Frame Buffer?
2.2 What is Frame Buffer Devices?
2.3 How to Write Frame Buffer Device Drivers?
3 Analysis of Linux Frame Buffer Driver Source ......
启动第一步--加载BIOS
当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的重要,以至于计算机必须在最开始就找到它。这是因为BIOS中包含了CPU的相关信息、设备启动顺序信息、硬盘信息、内存信息、时钟信息、PnP特性等等。在此之后,计算机心里就有谱了,知道应该去读取哪个硬件设备了。
启动第二步-- ......
出错信息
proc PARSE=FULL DBAccess.pc
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /home/oracle/app/product/9.2.0/precomp/admin/pcscfg.cfg
Error at line 34, column 11 in file /usr/include/stdio.h
# include <stddef.h> ......
C规则涉及到 队列(QUEUE) 分类器(CLASS) 过滤器(FILTER),filter划分的标志位可用U32或iptables的set-mark来实现 ) 一般是"控发"不控收 linux下有两块网卡,一个eth1是外网,另一块eth0是内网.在eth0上做HTB。(注意:filter划分标志位可用u32打标功能或iptables的set-mark功能,如果用iptables来打标记的话,下行速LV在et ......
折腾了大半天都终把tuxedo安装,并写好第一个例子,即然安装可以使用UI的方式进行安装,安装完成后要进行环境变量的配置,把tuxedo目录中的tux.env的配置,添加到/home/oracle/.bash_profile,因为我是以oracle用户来安装oracle 和tuxedo 的。
服务器端代码simpserv.c:
#include <stdio.h>
#include <ctyp ......