Linux Versions and Patches
Linux version
[1] 2.6.10
2.6 version number, 10 release number
[2] 2.6.10 and 2.6.11
They can differ significantly even in core components and in fundamental algorithms
[3] 2.6.11.12
when a new kernel release appears, it is potentially unstable and buggy. To address this problem, the kernel developers may release patched versions of any kernel, which are identified by a fourth number in the version numbering scheme
Which patch to apply which Release?
[1] Stable kernel patches apply to the base kernel version.
patch-2.6.17.10 --> linux-2.6.17 = linux-2.6.17.10
patch-2.6.17.10 -/-> linux-2.6.17.9
[2] base kernel release patches only apply to the previous base kernel version.
patch-2.6.18 --> linux-2.6.17 = linux-2.6.18
patch-2.6.18 -/-> linux-2.6.17.2
[3] incremental patches upgrade from a specific release to the next release
patch-2.6.17.10-11 --> linux-2.6.17.10 = linux-2.6.17.11
An example
How to go from the 2.6.17.9 kernel release, to the 2.6.17.11 release?
Finding the incremental patches http://www.kernel.org/pub/linux/kernel/v2.6/incr/
patch-2.6.17.9-10 --> linux-2.6.17.9 = linux-2.6.17.10
patch-2.6.17.10-11 --> linux-2.6.17.10 = linux-2.6.17.11
相关文档:
Linux内核配置办法:
1. make config
这种办法会遍历所有配置项,要求用户逐个选择Y/N/M
2. make menuconfig
这个办法是基于ncurse库编制的图形界面工具。常用
3. make xconfig
用于基于X11的图形工具
4. make gconfig
用于基于gtk+图形工具
5. make defconfig
创建一个默认的配置,生成当前的.config
6. make x ......
Linux 消息重定向办法
command > filename
把标准输出重定向到一个指定文件中
command 1 > fielname
把标准输出重定向到一个指定文件中(同上)
command 2 > filename
把标准错误重定向到一个文件中
command >! filename
把标准输出重定向到一个
指定
文件中,若文件存在,则覆盖
command >&am ......
/*
* 该文件主要实现的是truncate函数,该函数是释放指定i
* 节点在设备上占用的所有逻辑块,包括直接块、一次间
* 接块和二次间接块
*/
/*
* linux/fs/truncate.c
*
* (C) 1991 Linus Torvalds
*/
#include <linux/sched.h>
......
/*
* linux/fs/char_dev.c
*
* (C) 1991 Linus Torvalds
*/
#include <errno.h>
#include <sys/types.h> // 定义了基本的系统数据类型
#include <linux/sched.h>
#include <linux/kernel.h> // 含有一些内核常用函数的原形定义
#include < ......
在/etc/rc.d/init.d/ 创建oracle10g文件
touch oracle10g
chmod a+x oracle10g
[root@test~]# vi /etc/rc.d/init.d/oracle10g
#!/bin/bash
#chkconfig:345 51 49
#description:starts the oracle database deamons
#
ORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
case "$1" in
start)
echo ......