Drupal 模块开发基本教程

鸣谢:drewish 的模块样例

第一部分:基本模块结构

事实上,模块真正必须实现的函数只有一个,那就是hook_help()。这里我们约定在本文中对drupal的系统“钩子”我们都写为“hook_钩子名”的形式,你实现的时候的函数名实际上是“模块名_钩子名”的形式。

"什么是钩子(hook)?"Drupal是一个内容管理系统的编程框架,其核心功能已经很完备了。我们编写扩展模块时并不需要自己完成每一个功能,大多数扩展系统的方法只是按命名规则写好钩子(Hook)的实现函数,系统就会在特定的时候来调用你的函数,这样你的扩展功能就被实现了。记住,不是你去调用系统,而是系统来调用你,我觉得这个和Windows的消息循环是有点类似的。

Hook_help()可以告诉drupal系统模块的信息以使模块在“模块”管理页面上列出来,这样用户就可以选择是否启用或禁用此模块了。模块一但被
启用,模块文件里的全部代码都被包含到系统中,同时,模块的函数也可以调用drupal的所有可用函数和访问所有可用变量了。

下面是最简单的hook_help()写法,这里的模块文件名是[b]example.module[/b],模块名是example,记得在php文件要有〈?php和?〉标记在文件首尾。

function example_help($section) {    switch ($section) {        case 'admin/modules#description':            // 下面的描述会显示在admin/modules路径下的模块列表里            return t('An example module showing how to develop a module for Drupal.');    }}

只要将包含上面函数的example.module文件放到drupal目录下的modules子目录里,访问“模块”管理页面(在admin/modules)就可以启用这个模块了,简单吧。

注:上面的返回值中我们使用了t()函数,这个函数用以实现drupal的本地化,虽然代码里是写的英文,但如果我们有对应的本地语言的翻译,用户会看到对应的本地化字符串。

现在,我们有了一个可启用/禁用的模块了,在开始为它添加功能之前,我们先了解一下Drupal的模块开发编程规范(全文见

http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/CODING_STANDARDS.html?rev=1.1&content-type=text%2Fplain

)。Drupal为了最大程度的兼容PHP的不同版本,它不使用命名空间或类的封装特性,因此,我们需要特别注意命名的问题,一般的约定是:

1)函数和方法使用小写字符,并用下划线分隔单词。函数应当使用模块名作为前缀以避免不同模块间的函数名冲突。私有的函数和方法再在名称前加一个下划线。
2)常量名完全大写,并用下划线分隔单词。前面应当加上大写的模块名前缀。
3)你定义的全局变量的名字前加上“_模块名_”前缀。
其他的约定请参见编码规范。

模块可以实现的功能很多,一般分为如下几个功能类别:
1)产生页面显示内容;
2)自定义node类型;
3)扩展现有的node类型;
4)生成定制的区块(block);
5)控制node的显示权限;
6)文件上传;
7)定制过滤器(Filter);
8)其他高级应用。

下面我们以自定义页面显示内容为例开始module开发之旅。

第二部分:模块的自定义页面显示方法

        许多时候我们需要为一些数据显示一个自定义格式的页面。熟悉模板的同志们可能曾经失望的发现,模板只能控制除$content之外
的那部分页面。在模板里,内容区之外的其他部分你想怎么定义都行,但要控制内容的格式,对不起,它是由一个名为$content的变量一次输出了整个内容
正文。

        这就决定了,一般情况下,内容的格式控制只能通过模块来实现,呵呵——不会写程序的同志们可能要晕倒了;其实别的方法也不是没有,
就是……通过能写模块的人来实现,哈哈哈,这个是开玩笑哈,另一个方法是修改theme引擎来实现(这个另文阐述,放在这里离题了)。还有非标准的方法,
那些个就不介绍了,会误导群众,最后必将导致网站维护、升级异常困难等后果。

        下面是一个最简单的页面显示函数,输出我们要的内容:

function example_foo() {    $content = 'The quick brown fox jumps over the lazy dog.';    return $content;}

        真够简单,问题是我们该访问那个URL这个页面才会出来呢?下面drupal的url定义钩子hook_menu()隆重登场:

function example_menu($may_cache) {    $items = array();    // $may_cache参数用来将菜单项分为两类。    // $may_cache 为 TRUE时返回的菜单项对当前用户在任何时候都可用(并被缓存);    // 其他的则是可更改的或只在一定的路径下才被定义的,例如带参数的动态路径。    // 绝大多数模块都会有可缓存的菜单项。    if ($may_cache) {        // 这是你必须提供的最基本信息        $items[] = array('path' => 'foo',             'title' => t('foo'),             'callback' => 'example_foo',             'access' => TRUE);    }    return $items;}

        好了,现在访问http://example.com/foo,你可以看到输出的内容了……“Ooops,显示说404 not
found”。这个还是有可能的,因为$may_cache的菜单项都被缓存了,新的路径还没有刷新到缓存里面,此时,要么用devel模块clear
cache,要么浏览一下管理页面中的“菜单”页面就会刷新菜单路径缓存了。现在应该可以了,这样,你在example_foo()的$content里
想怎么构建你的页面都行,那个只是html+css的问题了。

        顺带讲一下hook_menu()。这个hook的用法蛮灵活,复杂的导航必备,例如通过定义MENU_LOCAL_TASK类型
的路径,可以在其他模块产生的页面上的Secondary
Tabs部分嵌入自己的页面。前面的例子里,我们在$items数组里用数组定义了页面的URL相对路径“path”,页面标题“title”,回调函数
“callback”和权限控制“access”,整一个意思就是告诉drupal的菜单系统“如果访问foo这个路径,那就调用example_foo
这个函数,产生的页面的标题是foo,同时允许任意用户访问(因为access始终是TRUE)”。

        下面是一个带参数的url地址定义:

function example_menu($may_cache) {    $items = array();        // 通过使用MENU_CALLBACK类型的路径,我们可以为指定路径注册一个        // 回调函数而不出现在菜单项列表里,管理员也不能在菜单管理里禁用这个路径        $items[] = array('path' => 'bar/baz', 'title' => t('baz'),            'callback' => 'example_baz',            'access' => TRUE,            'type' => MENU_CALLBACK);        // 下面的菜单项没有注册回调函数,此时,属性就会从父路径继承。        // 例如,这里也会使用父路径的权限控制。不过如果路径上有指定参数的话,        // 我们重定义了标题。        // 注意:如果没有'type'属性,此项会在菜单中显示,也就是说'type'不被继承。        $items[] = array('path' => 'bar/baz/52/97',            'title' => t('the magic numbers'),            'type' => MENU_CALLBACK);    }    return $items;}/** * 一个更加复杂的带参数的页面回调函数。 * * 参数是从页面的URL中传递的。参数位于页面访问路径的后面两个元素。 * 正因为如此,如果页面的URL发生了改变,这个函数也不需要重写。 * 在这里为参数提供缺省的值是个良好的习惯,这样页面才总是可以访问的。 */function example_baz($alice = 0, $bob = 0) {    // 永远不要相信URL中传来的值是安全的!一定要记得检查这些值。    if (!is_numeric($alice) || !is_numeric($bob)) {        // 如果参数都不是数字,我们将显示一个标准的“你无权访问”的页面        drupal_access_denied();        return;    }    $list[] = "Alice's number was $alice.";    $list[] = "Bob's number was $bob.";    $list[] = 'The total was '. ($alice + $bob) .'.';    // 调用theme函数实现输出的格式化,theme_item_list()只是许多theme函数中的一个    $content = theme('item_list', $list);    return $content;}

        如果用户访问http://example.com/?q=bar/baz,菜单系统会执行example_baz(),如果用户
访问http://example.com/?q=bar/baz/1/2,菜单系统会首先查找bar/baz/1/2,如果找不到对应定义会接着找
bar/baz/1。如果又找不到,它就会找bar/baz,这样它就会执行example_baz(1,2)。注意路径中的数字部分作为参数传递给了函
数,这个实在是非常好用。

        如果用户访问http://example.com/?q=bar/baz/52/97,菜单系统找到了匹配,但由于回调函数被省
略,因此它最终调用的是example_baz(52,97)。有什么不同呢,此时页面标题不再是“baz”,而是“the magic
numbers”了。

        前面所有的路径定义中access都为TRUE,但通常我们都希望对页面内容的访问作一些权限控制。此时我们需要在模块里实现hook_perm()函数:

function example_perm() {    return array('access foo', 'access baz');}

        现在,你在“访问控制”页面就可以分配这两个权限给指定的角色了。同时,你还要在hook_menu里这样定义'access':

'access' => user_access('access foo'),

        user_access()函数会访问$user全局变量和权限设定以确定访问页面的当前用户是否有'access
foo'这个权限,有就返回TRUE,没有返回FALSE。用户ID为1的用户默认拥有任何权限,即user_access(‘任意值’)对他来说都会返
回TRUE;权限管理对他完全没用,乖乖。——所以,有特殊要求时,记得还要控制uid=1的用户。

        好了,我相信你已经能够用模块定义自己的页面了——虽然看似有些繁琐,但恭喜你已经迈出模块之旅的第一步。

第三部分:自定义node类型

Drupal系统本质上是一个CMS系统Framework,你可以在此基础上为满足自己的要求自由的扩展。从Drupal的观点看,所有的内容对
象都应该是节点(node),整个Framework都基于这个假设来运转,从一个熟悉OOP的程序员的观点来看,node就是对象,处理不同类型的
node就象处理从node类派生的各种子类。当然,这不过是PHP程序而已,你尽可以想怎样就怎样,但是,和OOP的继承的好处一样,将内容纳入
node的管理体系至少可以立刻获得如下的功能和好处:

1) Drupal核心中node的基本增删修改删除功能,评论薄雾浓云愁永昼功能,分类功能,审核功能,日志功能,状态统计功能,搜索功能,各种node相关管理功能;
2) 所有支持node的drupal扩展模块提供的功能,包括但不仅限于节点附件上传,节点计划发布/隐藏,所见即所得编辑器,图片插入助理等等;
3) 核心和扩展模块的升级将立刻使你的节点类型享受增强的功能或特性;
4) 核心和扩展模块的安全补丁将使你的节点类型更加安全;
等等……,这一切只需要你定义一下节点类型即可获得,何乐而不为呢?如果你将内容放入drupal进行管理却不遵循node定义和管理的方式,我可以肯定
地说你会在系统升级方面遇到困难和麻烦——简言之就是大伙儿都不是你这么想的,你的代码和别人不兼容。这可能会是你在开源系统里能够遇到的最糟糕的一件事
了。

定义新的node类型其实非常简单,现在仅需一个hook_node_info(),而不向4.6版本时需要 hook_node_name() 和 hook_node_types()。模块文件名叫node_example.module:

function node_example_node_info() {    return array('node_example' => array('name' => t('example node'), 'base' => 'node_example'));}

hook_node_info()钩子是必须要实现的。此函数描述了这个模块可提供的节点。'name'的值是节点的人性化名字,'base'就是
drupal系统识别的名字了。Durpal通过'base'的值知道操作这种类型的节点时应当在hook函数将加上什么样的前缀:如果'base'为
“node_foo”,那么插入一个这种节点时调用的对应函数是'node_foo_insert'。

为界面友好的目的,我们一般还会实现hook_help(),这样用户创建节点时可以看到诸如介绍一类的东西:

function node_example_help($section) {    switch ($section) {        case 'admin/modules#description':            // 在admin/modules页面显示的模块描述信息            return t('An example module showing how to define a custom node type.');        case 'node/add#node_example':            // 在node/add“创建内容”页面上显示的此类型节点的帮助信息。            return t('This is an example node type with a few fields.');    }}

自然我们也要定义hook_perm以实现节点的权限控制。我们定义了三个权限,一个用来限制谁可以浏览此种节点,另一个用来限制谁可以创建此种节
点,最后一个用来限制是否允许用户修改自己创建的节点。为什么需要第三个权限呢?如果管理员允许未注册用户创建此种节点,那么管理员应该同时取消未注册用
户修改自己创建的节点的权限,因为未注册用户对系统来说都是uid为0的同一个用户。

function node_example_perm() {    return array('view example node', 'create example node', 'edit own example nodes');}

另外节点权限管理需要定义的钩子是hook_access(),这个钩子可以自定义用户对节点的增删修改等操作的权限。下面是最常见的定义模式:

function node_example_access($op, $node) {    global $user;    if ($op == 'view') {        // 有浏览权限的用户才能浏览此种节点        return user_access('view example node');    }    if ($op == 'create') {        // 有创建权限的用户才能创建此种节点        return user_access('create example node');    }    // 如果有需要的权限,创建节点的用户可以修改和删除它    if ($op == 'update' || $op == 'delete') {        if (user_access('edit own example nodes') && ($user->uid == $node->uid)) {            return TRUE;        }    }}

另一个需要定义权限的地方是节点添加的页面和路径,下面按照国际惯例定义hook_menu以控制谁可以访问增加节点的页面:

function node_example_menu($may_cache) {    $items = array();    if ($may_cache) {   // 此处只定义访问路径的权限即可        $items[] = array('path' => 'node/add/node_example', 'title' => t('example node'),            'access' => user_access('create example node'));    }    return $items;}

节点定义和用户权限都有了,下面我们可以开始完善节点的增删修改浏览的功能。这里使用的节点例子类型叫node_example,它允许用户节点中
保存“颜色(color)”和“数量(quantity)”两种自定义信息。因为要存储这些附加信息,我们需要在数据库中增加额外的表。

数据库定义:    CREATE TABLE node_example (            vid int(10) unsigned NOT NULL default '0',            nid int(10) unsigned NOT NULL default '0',            color varchar(255) NOT NULL default '',            quantity int(10) unsigned NOT NULL default '0',            PRIMARY KEY (vid, nid),            KEY `node_example_nid` (nid)        );

事实上,如果不需处理这些额外的附加信息,你会发现有上述函数的模块已经能够处理新定义的节点类型了,前面叙述的你该即刻享受的系统好处你都能享受到了,呵呵。但要处理节点类型特有的附加信息,我们还有许多工作要做:

(一) 增加自定义节点

首先,虽然基本的增加节点的提交页面系统已经提供了,但是上面没有我们要的自定义信息的输入框或选择框,这样我们就必须实现hook_form()
以在提交页面上收集自定义信息。这个钩子要求我们返回一个数组值,其中包含了定制表单各元素的定义信息,注意这也是drupal
4.7的标准表单定义方法。

function node_example_form(&$node) {    // 用来输入节点标题的文本框    $form['title'] = array(        '#type' => 'textfield',     // 表单元素的类型        '#title' => t('Title'),        // 表单元素的标题        '#required' => TRUE,    // 是否必须输入的值        '#default_value' => $node->title, //缺省值        '#weight' => -5    );    // 如果我们希望表单元素按特定的顺序排列,我们可以设置元素的Weight值。    // 但是其他模块可能也插入设置了weight值的表单元素,这样元素顺序可能仍然    // 不是我们想要的样子。为避免这一情况,我们可以把元素放到子数组中,一个    // 数组中的元素总是可以保证顺序的了吧!    $form['body_filter']['body'] = array(        '#type' => 'textarea',        '#title' => t('Body'),        '#default_value' => $node->body,        '#required' => FALSE    );    $form['body_filter']['filter'] = filter_form($node->format);    // 上面是普通应有的标题和正文,下面是我们特有的节点信息了    $form['color'] = array(        '#type' => 'textfield',        '#title' => t('Color'),        '#default_value' => $node->color    );    $form['quantity'] = array(        '#type' => 'textfield',        '#title' => t('Quantity'),        '#default_value' => $node->quantity,        '#size' => 10,        '#maxlength' => 10    );    return $form;}

用户用上面的表单提交数据,drupal自动会过滤提交的数据,对于表单里没有定义却被提交的值,drupal会自动把它们过滤掉以保证系统安全。
然后,我们可以通过hook_validate()验证提交的有效数据是不是我们真正想要的,下面我们验证一下用户提交的quantity值是不是一个数
字,不是就报告错误,用户会被要求重新输入,如果没有数据提交(因为前面表单定义里并没有要求此值是必须的),则认为quantity是0:

function node_example_validate(&$node) {    if ($node->quantity) {        if (!is_numeric($node->quantity)) {            form_set_error('quantity', t('The quantity must be a number.'));        }    }    else {        // Let an empty field mean "zero."        $node->quantity = 0;    }}

要注意的是告诉系统出错了并不是返回一个什么值,而是调用form_set_error设置表单错误,这样可以在一个函数里设定多个错误。

如果数据验证成功,则新节点就会生成了,新节点信息会写入到数据库中。且慢,我们好像并没有写入附加信息到数据库的程序段。当节点插入时,drupal会调用所有实现hook_insert()的函数,这让我们有机会向数据库写入我们自己的节点自定义信息:

function node_example_insert($node) {    db_query("INSERT INTO {node_example} (vid, nid, color, quantity)            VALUES (%d, %d, '%s', %d)", $node->vid, $node->nid, $node->color, $node->quantity);}

格式很简单,你不用考虑用户的提交是怎么被处理的,你只要直接引用它们就可以了,$node->color、$node->quantity什么的,它们一定正确的在那里。

(二) 修改自定义节点

        Drupal本身支持节点拥有多个版本,我们在这里也需要考虑到这一点。

function node_example_update($node) {    // 处理产生一个新版本的情况    if ($node->revision) {        node_example_insert($node);    }    else {        db_query("UPDATE {node_example} SET color = '%s', quantity = %d             WHERE vid = %d", $node->color, $node->quantity, $node->vid);    }}

(三) 删除自定义节点

删除很简单,系统本来就实现了节点的删除功能,我们需要做的是在适当的时候把我们写入数据库的附加信息给清除掉。当节点删除时,drupal会调用所有实现hook_delete()的函数,这样各个模块都有机会清理自己生产的垃圾了。

function node_example_delete($node) {    // 注意这里我们删除了指定nid的所有版本    db_query('DELETE FROM {node_example} WHERE nid = %d', $node->nid);}

(四) 与系统其他部分互动

负责载入节点对象的node_load()函数会发出hook_load()调用,以便扩展模块将自定义属性补充进它返回的$node对象中。因此我们还必须实现hook_load(),附加信息才会在载入节点对象时自动也被载入。

function node_example_load($node) {    $additions = db_fetch_object(db_query('SELECT color, quantity FROM {node_example}                    WHERE vid = %d',                 $node->vid));    return $additions;}

(五) 自定义节点显示格式

下面的代码实现了hook_view(),这个钩子在用户浏览节点时被调用。实现得很简单,节点的正文(body)和节选(teaser)都是系统
功能提供和实现的,我们只需要把自定义的信息加到其中即可。这里我们用的是最简单的方式,直接加在正文和节选的后面就可以了。实际情况下,这个显示的格式
是可以任意调整的。

function node_example_view(&$node, $teaser = FALSE, $page = FALSE) {    $node = node_prepare($node, $teaser);    $order_info = '<div class="node_example_order_info">';    $order_info .= t('The order is for %quantity %color items.',                    array('%quantity' => $node->quantity, '%color' => $node->color));    $order_info .= '</div>';    $node->body .= $order_info;    $node->teaser .= $order_info;}

        写到这里,发现要用好自定义节点类型要实现的hook还是蛮多的,不过只要按部就班,也应该能很快实现,就跟定义一个类然后实现些方法差不多。然后这个定义的节点就可以在系统中被自由使用了,似乎比OOP还要略微简单点。

=========================================

准备休息几天,这东西弄起来太累人啦。在此再次严重感谢drewish的模块例子,让我不用花很多心思去想例子了,呵呵。待续……

Powered by ScribeFire.

Leave a comment

linux

  本文欢迎转载,请注明“转载自linux宝库(www.linuxmine.com)”。

  获取更多linux技术文档,请访问linux宝库 -- http://www.linuxmine.com;

  深入讨论linux技术问题,请访问linux论坛 -- http://bbs.linuxmine.com;

  建立专业linux博客园地,请访问linux博客 -- http://blog.linuxmine.com;

  1 系统设置篇

  1001 修改主机名(陈绪)

 
 vi
/etc/sysconfig/network,修改HOSTNAME一行为"HOSTNAME=主机名"(没有这行?那就添加这一行吧),然后运行命令
"hostname 主机名"。一般还要修改/etc/hosts文件中的主机名。这样,无论你是否重启,主机名都修改成功

  1002 修改linux启动方式(文本方式或xwindow方式)(陈绪)

  vi /etc/inittab,找到id :x :initdefault:一行,x=3为文本方式 x=5为xwindow方式,重启机器即可生效

  1003 linux的自动升级更新问题(hutuworm,NetDC,陈绪)

  对于redhat,在www.redhat.com/corp/support/errata/找到补丁,6.1以后的版本带有一个工具up2date,它能够测定哪些rpm包需要升级,然后自动从redhat的站点下载并完成安装。

  升级除kernel外的rpm: up2date –u

  升级包括kernel在内的rpm: up2date -u –f

  Gentoo升级方法

  更新portage tree: emerge –sync

  更新/安装软件包: emerge [软件包名] (如安装vim: emerge vim)

  Debian跟别的发行版还是有很大的差别的,用Debian做服务器维护更加方便;红帽的升级其实挺麻烦的,当然,如果你交钱给红帽的话,服务是会不一样的。

  Debian下升级软件:

  apt-get update

  apt-get upgrade

  前提:配置好网络和/etc/apt/sources.list,也可以用apt-setup设置。

  1004 windows下查看linux分区的软件(陈绪,hutuworm)

  Paragon.Ext2FS.Anywhere.2.5.rar和explore2fs-1.00-pre4.zip

  现在不少Linux发行版安装时缺省基于LVM建分区,所以explore2fs也与时俱进地开始支持LVM2:

  http://www.chrysocome.net/downloads/explore2fs-1.08beta9.zip

  1005 mount用法(sakulagi,sxsfxx,aptkevin)

  fat32分区 mount -o codepage=936,iocharset=cp936 /dev/hda7 /mnt/cdrom

  ntfs分区 mount -t ntfs -o codepage=936,iocharset=cp936 /dev/hda7 /mnt/cdrom

  iso文件 mount -o loop /abc.iso /mnt/cdrom

  软盘 mount /dev/fd0 /mnt/floppy

  usb mount /dev/sda1 /mnt/cdrom

  cd光驱 mount -t iso9660 -o iocharset=cp936,ro /dev/cdrom /mnt/cdrom

  dvd光驱 mount -t iso9660 -o iocharset=cp936,ro /dev/dvd /mnt/cdrom或mount -t udf /dev/dvd /mnt/cdrom

  注意:dvd的格式一般为iso9660或udf之一

  在有scsi硬盘的计算机上,应该先用fdisk -l /dev/sd? 来看看到底usb闪存盘是在哪个设备下(通常会是sdb1或者sdc1)。

  所有/etc/fstab内容 mount –a,此命令还可以指定文件格式"-t 格式", 格式可以为vfat, ext2, ext3等

  例如,要自动将windows的d盘挂到/mnt/d上,用vi打开/etc/fstab,加入以下一行

  /dev/hda5 /mnt/d vfat defaults,codepage=936,iocharset=cp936 0 0

  注意,先得手工建立一个/mnt/d目录

  1006 访问远程共享的目录(陈绪)

  将如下的行放到/etc/fstab中:

  //ip/share1 /mnt/d smbfs defaults,auto,username=name,password= pass 0 0

  其中ip是远程机器的ip地址,是share1该机器共享目录的共享名,/mnt/d是要将该分区mount到本地linux的目录,name和pass是可以访问该共享目录的用户名和密码。

  1007.a 删除名为-a的文件(陈绪)

  1 rm ./-a

  2 rm -- -a,--告诉rm这是一个选项,具体参见getopt

  3 ls -i 列出inum,然后用find . -inum inum_of_thisfile -exec rm '{}' \;

  1007.b 删除名为\a的文件(陈绪)

  rm \\a

  1007.c 删除名字带的/和‘\0'文件(陈绪)

  这些字符是正常文件系统所不允许的字符,但可能在文件名中产生,如unix下的nfs文件系统在Mac系统上使用

  1 把nfs文件系统在挂到不过滤'/'字符的系统下,删除含特殊文件名的文件;

  2 将错误文件名的目录其它文件移走,ls -id 显示含该文件目录的inum,umount 文件系统,clri清除该目录的inum,fsck,mount,检查lost+found目录,将其中的文件更名。

  另外,可以通过windows ftp过去删除任何文件名的文件

  1007.d 删除名字带不可见字符的文件(陈绪)

  列出文件名并转储到文件:ls -l > del.sh

  然后编辑文件的内容加入rm命令使其内容成为删除上述文件的格式:

  vi del.sh

  rm -rf *******

  执行sh del.sh

  1007.e 删除文件大小为零的文件(陈绪)

  1 rm -i `find ./ -size 0`

  2 find ./ -size 0 -exec rm {} \;

  3 find ./ -size 0 | xargs rm -f &

  4 for file in * #自己定义需要删除的文件类型

  do

  if [ ! -s ${file} ]

  then

  rm ${file}

  echo "rm $file Success!"

  fi

  done

  1008 redhat设置滚轮鼠标(mc1011)

  1 进入x后,选择鼠标的配置,选择wheel mouse (ps/2)就可以了,如果鼠标表现异常,重启计算机即可;

  2 直接su, vi /etc/X11/XF86Config, 把PS/2改成ImPS/2

  1009 加装xwindow(陈绪)

  用linux光盘启动,选择升级,然后单独选择包,安装即可

  1010 删除linux分区(陈绪)

  1 做一张partition magic的启动软盘,启动后删除;

  2 用win2000的启动光盘启动,然后删除

  1011 如何退出man(陈绪)

  q

  1012 不编译内核,mount ntfs分区(陈绪,hutuworm)

  找到对应内核版本(uname -a)的ntfsrpm,安装即可。

  以原装rh8为例,未升级或编译内核

  1. 上google.com搜索并下载 kernel-ntfs-2.4.18-14.i686.rpm

  2. rpm -ivh kernel-ntfs-2.4.18-14.i686.rpm

  3. mkdir /mnt/c

  4. mount -t ntfs /dev/hda1 /mnt/c

  或

  Read only: http://linux-ntfs.sourceforge.net/

  Read/Write: http://www.jankratochvil.net/project/captive/

  1013 tar分卷压缩和合并(WongMokin,Waker)

  以每卷500M为例

  tar分卷压缩:tar cvzpf - somedir | split -d -b 500m (-d不是split的选项,是shell的选项,表示将tar命令的输出作为split的输入)

  tar多卷合并:cat x* > mytarfile.tar.gz

  1014 使用lilo/grub时找回忘记了的root口令(陈绪)

  1.在系统进入单用户状态,直接用passwd root去更改;

  2.用安装光盘引导系统,进入linux rescue状态,将原来/分区挂接上来,命令如下:

  cd /mnt

  mkdir hd

  mount -t auto /dev/hdaX(原来分区所在的分区号) hd

  cd hd

  chroot ./

  passwd root

  这样可以搞定;

  3.将本机的硬盘拿下来,挂到其他的linux系统上,采用的办法与第二种相同

  以rh8为例,演示第1种方法如下:

  一. lilo

  1 在出现 lilo: 提示时键入 linux single

  画面显示 lilo: linux single

  2 回车可直接进入linux命令行

  3 vi /etc/shadow

  将第一行,即以root开头的一行中root:后和下一个:前的内容删除,

  第一行将类似于

  root::......

  保存

  4 reboot重启,root密码为空

  二. grub

  1 在出现grub画面时,用上下键选中你平时启动linux的那一项(别选dos),然后按e键;

  2 再次用上下键选中你平时启动linux的那一项(类似于kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/),然后按e键;

  3 修改你现在见到的命令行,加入single,结果如下:

  kernel /boot/vmlinuz-2.4.18-14 single ro root=LABEL=/

  4 回车返回,然后按b键启动,即可直接进入linux命令行

  5 vi /etc/shadow

  将第一行,即以root开头的一行中root:后和下一个:前的内容删除,

  第一行将类似于

  root::......

  保存

  6 reboot重启,root密码为空

  1015 使ctrl+alt+del失效(陈绪)

  vi /etc/inittab

  将ca::ctrlaltdel:/sbin/shutdown -t3 -r now这行注释掉

  1016 查看redhat的版本号(hutuworm)

  cat /proc/version或cat /etc/redhat-release或cat /etc/issue

  1017 查文件属于哪个rpm(无双)

  上www.rpmfind.net上搜,或者rpm -qf 文件名得到

  1018 将man或info的信息存为文本文件(陈绪)

  以rpm命令为例:

  man rpm | col -b > rpm.txt

  info rpm -o rpm.txt –s

  1019 利用两个现存文件,生成一个新的文件(陈绪)

  1. 取出两个文件的并集(重复的行只保留一份)

  cat file1 file2 | sort | uniq

  2. 取出两个文件的交集(只留下同时存在于两个文件中的文件)

  cat file1 file2 | sort | uniq -d

  3. 删除交集,留下其他的行

  cat file1 file2 | sort | uniq –u

  1020 设置com1口,让超级终端通过com1口进行登录(陈绪)

  第一步:确认有/sbin/agetty,编辑/etc/inittab,添加

  7:2345:respawn:/sbin/agetty /dev/ttyS0 9600

  9600bps是因为连路由器时缺省一般都是这种速率,也可以设成

  19200、38400、57600、115200

  第二步:修改/etc/securetty,添加一行:ttyS0,确保root用户能登录

  第三步:重启机器,就可以拔掉鼠标键盘显示器(启动时最好还是要看看输出信息)了

  1021 删除内有文件和子目录的目录(陈绪)

  rm -rf 目录名

  1022 查看系统信息(陈绪)

  cat /proc/cpuinfo - CPU (i.e. vendor, Mhz, flags like mmx)

  cat /proc/interrupts - 中断

  cat /proc/ioports - 设备IO端口

  cat /proc/meminfo - 内存信息(i.e. mem used, free, swap size)

  cat /proc/partitions - 所有设备的所有分区

  cat /proc/pci - PCI设备的信息

  cat /proc/swaps - 所有Swap分区的信息

  cat /proc/version - Linux的版本号 相当于 uname -r

  uname -a - 看系统内核等信息

  1023 去掉多余的回车符(陈绪)

  sed 's/^M//' test.sh > back.sh, 注意^M是敲ctrl_v ctrl-m得到的

  或者 dos2unix test.sh

  1024 切换X桌面(lnx3000)

  如果你是以图形登录方式登录linux,那么点击登录界面上的session(任务)即可以选择gnome和kde。如果你是以文本方式登录,那执行switchdesk gnome或switchdesk kde,然后再startx就可以进入gnome或kde。

  (或者vi ~/.xinitrc,添加或修改成exec gnome-session 或exec startkde,然后用startx启动x)

  1025 通用的声卡驱动程序(lnx3000)

  OSS www.opensound.com / ALSA www.alsa-project.org/

  1026 改变redhat的系统语言/字符集(beming,mc1011)

  修改 /etc/sysconfig/i18n 文件,如

  LANG="en_US",xwindow会显示英文界面,

  LANG="zh_CN.GB18030",xwindow会显示中文界面。

  还有一种方法

  cp /etc/sysconfig/i18n $HOME/.i18n

  vi $HOME/.i18n 文件,如

  LANG="en_US",xwindow会显示英文界面,

  LANG="zh_CN.GB18030",xwindow会显示中文界面。

  这样就可以改变个人的界面语言,而不影响别的用户

  1027 把屏幕设置为90列(陈绪)

  stty cols 90

  1028 使用md5sum文件(陈绪)

  md5sum isofile > hashfile

  md5sum文件与hashfile文件的内容比对,验证hash值是否一致

  md5sum –c hashfile

  1029 一次解压多个zip文件(陈绪)

  unzip "*",注意引号不能少

  1030 看pdf文件(陈绪)

  安装Acrobat Reader

  1031 查找权限位为S的文件(陈绪)

  find . -type f \( -perm -04000 -o -perm -02000 \) -exec ls -lg {} \;

  1032 装中文输入法(陈绪,hutuworm)

  以redhat8为例,xwindow及其终端下的不用说了,缺省就安装了,用ctrl-space呼出。

 
 现在讨论纯console,请到http://zhcon.sourceforge.net/下载zhcon-0.2.1.tar.gz,放在任一目录
中,tar xvfz zhcon-0.2.1.tar.gz,cd zhcon-0.2.1,./configure,make,make
install。安装结束后,要使用zhcon,请运行zhcon,想退出,运行exit

  1033 把弹出的光盘收回来(beike)

  eject –t

  1034 cd光盘做成iso文件(弱智,grub007)

  cp /dev/cdrom /tmp/xxx.iso 或 dd if=/dev/cdrom of=/tmp/xxx.iso

  1035 快速观看开机的硬件检测(弱智)

  dmesg | more

  1036 查看硬盘的使用情况(陈绪)

  df -k 以K为单位显示

  df -h 以人性化单位显示,可以是b,k,m,g,t..

  1037 查看目录的大小(陈绪)

  du -sh 目录名

  -s 仅显示总计

  -h 以K、M、G为单位,提高信息的可读性。KB、MB、GB是以1024为换算单位

  -H 以1000为换算单位

  1038 查找或删除正在使用某文件的进程(wwwzc)

  fuser filename

  fuser -k filename

  1039 安装软件(陈绪)

  rpm -ivh aaa.rpm

  tar xvfz aaa.tar.gz; cd aaa; ./configure; make; make install

  1040 字符模式下设置和删除环境变量(陈绪)

  bash下

  设置:export 变量名=变量值

  删除:unset 变量名

  csh下

  设置:setenv 变量名 变量值

  删除:unsetenv 变量名

  1041 ls如何看到隐藏文件(即以.开头的文件)(双眼皮的猪)

  ls –a 或 l. (适用于redhat)

  1042 查看rpm中文件的安装位置(陈绪)

  rpm -qpl aaa.rpm

  1043 使用src.rpm编译出二进制rpm(陈绪)

  rpmbuild --rebuild *.src.rpm

  1044 设置vim中显示或不显示字体颜色(陈绪)

  首先确保安装了vim-enhanced包,然后,vi ~/.vimrc; 如果有syntax on,则显示颜色,syntax off,则不显示颜色

  1045 linux是实时还是分时操作系统(陈绪)

  标准的内核是分时的,但是有些厂商也改造出了实时linux系统

  1046 make bzImage -j的j是什么意思(wind521)

  -j主要是用在当你的系统硬件资源比较足的时候,用改选项可以加快编译速度,如-j 3

  1047 如何安装内核源码包(陈绪)

  把你光盘上的内核源码包装上即可,rpm -i *kernel*source*.rpm

  1048 修改系统时间(陈绪,laixi781211,hutuworm)

  1 设置你的时区: timeconfig里选择Asia/Shanghai (如果你位于GMT+8中国区域)

  2 与标准时间服务器校准: ntpdate time.nist.gov

  当然,如果你是李嘉诚,也可以跟自己的手表校准: date -s STRING (STRING格式见man date),修改后执行clock -w 写到CMOS

  date -s “2003-04-14 cst”,cst指时区,时间设定用date -s 18:10

  3. 将当前软件系统时间写入硬件时钟: hwclock –systohc

  1049 把命令结果传给一个变量(陈绪)

  aa=`grep _GQAdd $1`,注意这个`是反引号

  1050 linux怎么用这么多内存(陈绪)

  为了提高系统性能和不浪费内存,linux把多的内存做了cache,以提高io速度

  1051 /etc/fstab配置项里最后两个数字是什么意思(lnx3000)

  第一个叫fs_freq,用来决定哪一个文件系统需要执行dump操作(dump执行ext2的文件系统的备份操作),0就是不需要;

  第二个叫fs_passno,是系统重启时fsck程序检测磁盘(fsck检测和修复文件系统)的顺序号,0表示该文件系统不被检测,1是root文件系统,2是别的文件系统。fsck按序号检测磁盘

  1052 让用户的密码必须有一定的长度,并且符合复杂度(eapass)

  vi /etc/login.defs,修改PASS_MIN_LEN

  1053 翻译软件(陈绪,hutuworm)

  星际译王 xdict

  console下还有个dict工具,通过DICT协议到dict.org上查11本字典,例如:dict RTFM

  1054让显示器不休眠(陈绪)

  setterm -blank 0

  setterm -blank n (n为等待时间)

  1055 用dat查询昨天的日期(gadfly)

  date --date='yesterday'

  1056 xwindow下如何截屏(陈绪)

  使用Ksnapshot或者gimp

  1057.a 解压小全(陈绪,noclouds,hmkart)

  tar -I或者bunzip2命令都可以解压.bz2文件

  tar xvfj example.tar.bz2

  tar xvfz example.tar.gz

  tar xvfz example.tgz

  tar xvf example.tar

  unzip example.zip

  rpm2cpio example.rpm │ cpio -div

  arp example.deb data.tar.gz | tar zxf -

  tar -jvxf some.bz,就是把tar的zvxf 改成jvxf

  zip/tar rh8下有一个图形界面的软件file-roller可以做这件事。另外可以用unzip *.zip解开zip文件,unrar *.rar解开rar文件,不过unrar一般系统不自带,要到网上下载:

  http://www.linuxeden.com/download/softdetail.php?softid=883

  下载rar for Linux 3.2.0,解压开后make,然后可以用unrar e youfilename.rar解压rar文件

  Alien提供了.tgz, .rpm, .slp和.deb等压缩格式之间的相互转换:

  http://sourceforge.net/projects/alien

  sEx提供了几乎所有可见的压缩格式的解压接口:

  http://sourceforge.net/projects/sex

  1057.b tar的压缩和解压用法(platinum)

  解压:x

  压缩:c

  针对gz:z

  针对bz2:j

  用于显示:v

  解压实例:

  gz文件:tar xzvf xxx.tar.gz

  bz2文件:tar xjvf xxx.tar.bz2

  压缩实例:

  gz文件:tar czvf xxx.tar.gz /path

  bz2文件:tar cjvf xxx.tar.bz2 /path

  1058 在多级目录中查找某个文件的方法(青海湖)

  1 find /dir -name filename.ext

  2 du -a | grep filename.ext

  3 locate filename.ext

  1059 不让普通用户自己改密码(myxfc)

  [root@xin_fc etc]# chmod 511 /usr/bin/passwd

  又想让普通用户自己改密码

  [root@xin_fc etc]# chmod 4511 /usr/bin/passwd

  1060 显卡实在配不上怎么办(win_bigboy)

  去http://www.redflag-linux.com/,下了xfree86 4.3安装就可以了

  1061 超强删除格式化工具(弱智)

  比pqmagic更安全的、进行删除格式化的小工具:sfdisk.exe for msdos

  下载地址:http://www.wushuang.net/soft/sfdisk.zip

  1062 如何让xmms播放列表里显示正确的中文(myxfc)

  -*-*-*-*-*-iso8859-1,-misc-simsun-medium-r-normal--12-*-*-*-*-*-gbk-0,*-r-

  把这个东西完全拷贝到你的字体里面

  操作方法:右键单击xmms播放工具的任何地方,会看到一个"选项",然后选择"功能设定",选择"fonts",然后把上面的字体完整的拷贝到"播放清单"和"user x font"中

  1063 redhat linux中播放mp3文件(hehhb)

 
 自带的xmms不能播放MP3(无声),要安装一个rpm包:rpm -ivh
xmms-mp3-1.2.7-13.p.i386.rpm。打开xmms,ctl-p,在font栏中先在上半部的小框内打勾,再选择
“fixed(misc) gbk-0 13”号字体即可显示中文歌曲名。在音频输出插件中选择 "开放音频系统驱动程序1.2.7
[lioOSS.so],即可正常播放MP3文件

  1064 安装中文字体(hehhb)

  先下载

http://freshair.netchina.com.cn/~George/sm.sh文件,然后在微软网站下载SimSun18030.ttc

(http://www.microsoft.com/china/windows2000/downloads/18030.asp),它是个msi文
件,在mswindows中安装用的,装好后在windows目录下的fonts目录里面就可以找到它。把simsun.ttc,
SimSun18030.ttc,tahoma.ttf,tahomabd.ttf拷贝到/usr/local/temp,然后下载的sm.sh文件也放
到这个目录里,最后打开终端

  cd /usr/local/temp

  sh sm.sh

  1065 移动光标(陈绪)

  echo -e '\033[20;10f' 把光标移动到20行10列

  另外,如果还出现乱码,可以改为iocharset=utf8

  1066 在x下使用五笔和拼音,区位输入法(hmkart)

  从http://www.fcitx.org/上下载fcitx的rpm包安装即可

  1067 ls重定向到多个文件(陈绪)

  ls | tee 1.txt 2.txt 3.txt .....

  1068 硬盘iso安装后怎么添加和删除rpm包(sakulagi)

  redhat-config-packages --isodir=<PATH>

  <PATH>为iso文件所在的目录

  1069 字符下控制音量(grub007,天外闲云)

  使用aumix。保存oss的音量大小的步骤为:

  1、用aumix将音量调整为你们满意的音量;

  2、用root用户进入/usr/lib/oss下(oss的默认安装目录);

  3、执行./savemixer ./mixer.map;

  4、ok,以后oss开启之后就是你在第一步调整的音量了。

  1170 echo典型应用(陈绪)

  echo "abcdefg" | perl -lne '{$a = reverse($_); print $a;}' 把一个字符串翻转

  echo bottle|rev 把一个字符串翻转

  1071 删除几天以前的所有东西(包括目录名和目录中的文件)(shally5)

  1 find . -ctime +3 -exec rm -rf {} \;

  2 find ./ -mtime +3 -print|xargs rm -f –r

  1072 用户的crontab在哪里(hutuworm)

  /var/spool/cron/下以用户名命名的文件中

  1073 以不同的用户身份运行程序(陈绪)

  su - username -c "/path/to/command"

  有时候需要运行特殊身份的程序, 就可以让su来做

  1074 不改变inode清空一个文件(陈绪)

  > filename

  1075 为什么OpenOffice中不能显示中文(allen1970)

  更改字体设置

  tools->options->font replacement

  Andale Sans UI -> simsun

  1076 如何备份Linux系统(Purge)

  Symantec Ghost 7.5以后的版本支持Ext3 native复制

  1077 linux上的partition magic(wwwzc)

  Linux下一个有用的分区工具:parted,可以实时修改分区大小, 删除和建立分区.

  1078 /proc/sys/sem中每项代表的意思(sakulagi)

  /proc/sys/sem内容如下

  250 32000 32 128

  这4个参数依次为SEMMSL(每个用户拥有信号量最大数量),SEMMNS(系统信号量最大数量),SEMOPM(每次semop系统调用操作数),SEMMNI(系统信号量集最大数量)

  1079 Grub 引导菜单里 bigmem smp up 都是什么意思(lnx3000)

  smp: (symmetric multiple processor)对称多处理器模式

  bigmem: 支持1G 以上内存的优化内核

  up:(Uni processor) 单处理器的模式

  1080 oracle的安装程序为什么显示乱码(lnx3000)

  现在oracle的安装程序对中文的支持有问题,建议使用英文界面来安装,在执行runinstaller之前,执行:export LANG=C;export LC_ALL=C

  1081 linux下文件和目录的颜色代表的含义(sakulagi,弱智)

  蓝色表示目录;绿色表示可执行文件;红色表示压缩文件;浅蓝色表示链接文件;灰色表示其它文件;红色闪烁表示链接的文件有问题了;黄色是设备文件,包括block, char, fifo。

  用dircolors -p看到缺省的颜色设置,包括各种颜色和“粗体”,下划线,闪烁等定义

  1082 查看有多少活动httpd的脚本(陈绪)

  #!/bin/sh

  while (true)

  do

  pstree |grep "*\[httpd\]$"|sed 's/.*-\([0-9][0-9]*\)\*\[httpd\]$/\1/'

  sleep 3

  done

  1083 如何新增一块硬盘(好好先生)

  一、关机,物理连接硬盘

  如果是IDE硬盘,注意主、从盘的设置;如果是SCSI硬盘,注意选一个没被使用的ID号。

  二、开机,检查硬盘有没有被linux检测到

  dmesg |grep hd*(ide硬盘)

  dmesg |grep sd*(SCSI硬盘)

  或者 less /var/log/dmesg

  如果你没有检测到你的新硬盘,重启,检查连线,看看bios有没有认出它来。

  三、分区

  你可以使用fdisk,Sfdisk或者parted(GNU分区工具,linux下的partition magic)

  四、格式化

  mkfs

  五、修改fstab

  vi /etc/fstab

  1084 看分区的卷标(q1208c)

  e2label /dev/hdxn, where x=a,b,c,d....; n=1,2,3...

  1085 RH8,9中添加新的语言包(好好先生)

  一 8.0中

  1.放入第一张光盘;

  2.cd /mnt/cdrom/Redhat/RPMS;

  3.rpm -ivh ttfonts-ZH_CN-2.11-29.noarch.rpm(简体中文,建议用tab键来补齐后面的部分,以免输入有误);

  4.rpm -ivh ttfonts-ZH_TW-2.11-15.noarch.rpm(繁体中文)

  如果你还想装日文、韩文,安装第二张光盘上的ttfonts*.rpm.

  二 9.0中

  9.0不在第一张盘上,在第三张盘上.rpm包名分别为:

  ttfonts-zh_CN-2.12-1.noarch.rpm(简体中文)

  ttfonts-zh_TW-2.11-19.noarch.rpm(繁体中文)

  1086 终端下抓屏(tsgx)

  1 cat /dev/vcsX >screenshot 其中,X表示第X个终端

  2 运行script screen.log,记录屏幕信息到screen.log里。一会记录到你exit为此。这也是抓屏的好方法

  这是在debian的cookbook上看到的。在RH9上能用

  1087 让一个程序在退出登陆后继续运行(NetDC,双眼皮的猪,noclouds,陈绪)

  1 nohup command &

  2 # command

  # disown

  1088 man命令不在路径中时,查看非标准的man文件(陈绪)

  nroff -man /usr/man/man1/cscope.1 | more

  1089 cp时显示进度(陈绪)

  cp -r -v dir1 dir2

  cp -a -d -v dir1 dir2

  1090 编辑/etc/inittab后直接生效(陈绪)

  init q

  1091 让linux连续执行几个命令,出错停止(陈绪)

  command1 && command2 && command3

  1092 如何将grub安装到mbr(陈绪, NetDC)

  grub> root (hd0, 0)

  grub> setup (hd0)

  也可以用grub-install /dev/hda来安装grub

  1093 安装时把grub(lilo)写到linux分区的引导区还是主引导扇区(MBR)(陈绪)

  如果你想电脑一启动就直接进入操作系统启动菜单就把grub(lilo)写到MBR上,如果写到linux分区的引导区则要用引导盘引导。建议写到 MBR,方便点

  1094 如何让多系统共存(陈绪)

  98系统的话用lilo(grub)引导,2k/nt则使用osloader引导多系统

  1095 如何在图形界面和控制台(字符界面)之间来回切换(陈绪)

  1 图形界面到控制台:Ctr+Alt+Fn(n=1,2,3,4,5,6);

  2 各控制台之间切换:Alt+Fn(n=1,2,3,4,5,6);

  3 控制台到图形:Alt+F7

  1096 Redhat linux常用的命令(陈绪)

  <1>ls:列目录。

  用法:ls或ls dirName,参数:-a显示所有文件,-l详细列出文件。

  <2>mkdir:建目录。

  用法:mkdir dirName,参数:-p建多级目录,如:mkdir a/b/c/d/e/f -p

  <3>find:查找文件。

 
 用法:find inDir -name
filename,inDir是你要在哪个目录找,filename是你要找的文件名(可以用通配符),用通配符时filename最好用单引号引起来,
否则有时会出错,用例:find . -name test*,在当前目录查找以test开头的文件。

  <4>grep:在文件里查找指定的字符串。

 
 用法:grep string
filename,在filename(可用通配符)里查找string(最好用双引号引起来)。参数:-r在所有子目录里的filename里找。用
例:grep hello *.c -r在当前目录下(包括子目录)的所有.c文件里查找hello。

  <5>vi:编辑器。

 
 用法:vi filename。filename就是你要编辑的文本文件。用了执行vi
filename后,你可能会发现你无法编辑文本内容,不要着急,这是因为vi还没进入编辑状态,按a或i就可以进入编辑状态了,进入编辑状态后你就可以
编辑文本了。要退出编辑状态按Esc键就可以了。以下操作均要在非编辑状态下。查找文本:输入/和你要查找的文本并回车。退出:输入:
和q并回车,如果你修改了文本,那么你要用:q!回车才能退出。保存:输入: w回车,如果是只读文件要用: w!。保存退出:输入:
wq回车,如果是只读就:
wq!回车。取消:按u就可以了,按一次就取消一步,可按多次取消多步。复制粘贴一行文本:把光标移到要复制的行上的任何地方,按yy(就是连按两次
y),把光标移到要粘贴地方的上一行,按p,刚才那行文本就会被插入到光标所在行的下一行,原来光标所在行后面所有行会自动下移一行。复制粘贴多行文本:
跟复制一行差不多,只是yy改成先输入要复制的行数紧接着按yy,后面的操作一样。把光标移到指定行,输入:和行号并回车,如移到123行:123回车,
移到结尾:$回车

  1097 linux文本界面下如何关闭pc喇叭(labrun,sakulagi)

  1 将/etc/inputrc中的set bell-style none 前的#去掉;

  2 echo "set bell-style none" >> ~/.bashrc;

  3 去除vi的铃声,echo "set vb t_vb=" >> ~/.vimrc

  1098 重装windows导致linux不能引导的解决办法(好好先生)

 
 如果没有重新分区,拿linux启动盘(或者第一张安装光盘)引导,进入rescue模式。首先找到原来的/分区mount在什么地方。redhat通
常是/mnt/sysimage. 执行"chroot /mnt/sysimage". 如果是grub,输入grub-install
/dev/hd*(根据实际情况);如果是lilo,输入lilo
-v,然后重新启动。如果分区有所改变,对应修改/etc/lilo.conf和/boot/grub/grub.conf然后再执行上述命令

  1099 为什么装了LINUX后win2K很慢(lnx3000,好好先生)

  你在2000应该能看见Linux的逻辑盘,但不能访问,解决方法是在磁盘管理里,选中这个盘,右击->更改"驱动器名和路径"->"删除"就可以了,注意不是删除这个盘

  1100 将linux发布版的iso文件刻录到光盘的方法(陈绪)

  在windows中使用nero软件,选择映象文件刻录->iso文件,刻录即可

  1101 linux中刻录iso的方法(hutuworm)

  1 使用xcdroast,选择制作光碟,选择ISO文件,刻录!

  参见http://www.xcdroast.org/xcdr098/faq-a15.html#17

  2 找刻录机的命令:

  cdrecord --scanbus

  输出结果为:

  0,0,0 0) 'ATAPI ' 'CD-R/RW 8X4X32 ' '5.EZ' Removable CD-ROM

  刻录的命令:

  cdrecord -v speed=8 dev=0,0,0 hutuworm.iso

  3 使用k3b可以刻录CD/DVD

  k3b主页:http://www.k3b.org/

  (实际上k3b是个图形界面,刻录CD利用了cdrecord,刻录DVD利用了dvd+rw-tools http://fy.chalmers.se/~appro/linux/DVD+RW/ )

  1102 屏幕变花时怎么办(双眼皮的猪)

  当您一不小心cat了一个并不是文本的文件时,屏幕会变花,那么您可以按两下"Enter"键,再敲"reset",那么屏幕就恢复正常了....

  1103 卸载软件包时得知具体包名(diablocom)

  删除软件包的命令是rpm -e XXX,如果不知道这个XXX的确切拼写时,可以用rpm -qa查询所有安装的软件包或者用rpm -qa |grep xxxx查询出名字

  1104 使用内存作linux下的/tmp文件夹(yulc)

  在/etc/fstab中加入一行:

  none /tmp tmpfs default 0 0

  或者在/etc/rc.local中加入

  mount tmpfs /tmp -t tmpfs -o size=128m

  注:size=128m 表示/tmp最大能用128m

  不管哪种方式,只要linux重启,/tmp下的文件全部消失

  1105 用ls只列出目录(yulc)

  ls -lF | grep ^d

  ls -lF | grep /$

  ls -F | grep /$

  1106 在命令行下列出本机IP地址,而不是得到网卡信息(yulc)

  ifconfig |grep "inet" |cut -c 0-36|sed -e 's/[a-zA-Z: ]//g'

  hostname –i

  1107 修改/etc/profile或者$HOME/.profile文件后如何立即生效(peter333)

  #source /etc/profile (或者source .profile)

  1108 bg和fg的使用(陈绪)

  输入ctrl+z,当前一个任务会被挂起并暂停,同时屏幕上返回进程号,此时用 "bg %进程号",会把这个进程放到后台执行,而用" fg %进程号 "就能让这个进程放到前台来执行。另外,job命令用来查看当前的被bg的进程

  1109 ctrl+s与ctrl+q(陈绪)

  ctrl-s用来暂停向终端发送数据的,屏幕就象死了一样,只能用ctrl-q来恢复

  1110 目录统计脚本(陈绪)

  保存成total.sh,然后用total.sh 绝对路径,就能统计路径下目录的大小了

  代码:

  #!/bin/sh

  du $1 --max-depth=1 | sort -n|awk '{printf "%7.2fM ----> %s\n",$1/1024,$2}'|sed 's:/.*/\([^/]\{1,\}\)$:\1:g'

  1111 grep不显示本身进程(陈绪)

  #ps -aux|grep httpd|grep -v grep

  grep -v grep可以取消显示你所执行的grep本身这个进程,-v参数是不显示所列出的进程名

  1112 删除目录中含输入关键字的文件(WongMokin)

  find /mnt/ebook/ -type f -exec grep "在此输入关键字" {} \; -print -exec rm {} \;

  1113 让cron中的任务不回馈信息, 本例5分钟检查一次邮件(WongMokin)

  0-59/5 * * * * /usr/local/bin/fetchmail > /dev/null 2>&1

  1114 在当前目录下解压rpm文件(陈绪)

  cat kernel-ntfs-2.4.20-8.i686.rpm | rpm2cpio | pax –r

  1115 合并两个Postscript或PDF文件(noclouds)

  $ gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite \

  -sOutputFile=bar.ps -f foo1.ps foo2.ps

  $ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \

  -sOutputFile=bar.pdf -f foo1.pdf foo2.pdf

  1116 去掉apache的manual目录中的所有.en的后缀名(陈绪)

  进入到manual目录

  代码:

  find ./ -regex .*\.en|awk -F. '{ printf "mv %s.%s.%s.%s %s.%s.%s\n",$1,$2,$3,$4,$1,$2,$3}'|sh

  1117 如何起多个X(noclouds)

  startx默认以display :0.0起第一个X,通过传递参数给Xserver可以起多个X:

  # startx -- :1.0

  # startx -- :2.0

  ...

  然后用Ctrl-Alt-F7/F8...切换

  1118 split分割合并文件(陈绪)

  split -b1440k a_whopping_big_file chunk

  cat chunk* > a_whopping_big_file

  1119 看Linux启动时屏幕的显示信息(陈绪)

  启动完毕后用命令dmesg查看

  1120 我需要编译内核,内核源码在哪里(platinum)

  1、一般在发行版的盘里都有,比如 RedHat,一般在第二、第三张上

  2.4 内核的叫 kernel-source-2.4.xx-xx.rpm

  2.6 内核的叫 kernel-devel-2.6.xx-xx.rpm

  2、去www.kernel.org下载一份你喜欢的

  1121 让fedora开机后自动login(dzho002)

  1 rpm -ihv autologin-1.0.0-7mdk.i586 rpm

  2 建立文件 /etc/sysconfig/autologin

  在里面加上一行.

  USER = root

  1122 如何配置让哪些服务启动(天外闲云,q1208c)

  1 运行ntsysv或者setup命令,进入菜单进行配置;

  2 chkconfig --list 显示服务

  chkconfig name on/off 打开/关闭“name”服务

  1123 安全删除linux(天外闲云)

  步骤1 dos下使用fdisk /mbr或者用win2000/xp的光盘启动进入故障恢复控制台,使用命令fixmbr

  步骤2 格式化linux分区为windows分区即可

  1124 用grub引导进文本界面(天外闲云)

  进入grub之后,按a,输入 空格 3 就可以引导进入文本界面,但是不修改系统的运行级,只在当次有效

  1125 先测试patch是否运行正常,暂不将更改应用到kernel(jiadingjun)

  patch --dry-run

  1126 redhat和debian上的软件安装卸载用法(NetDC)

  卸载一个软件包:

  rpm -e <package-name>

  dpkg -r <package-name>

  显示一个软件包的内容:

  rpm -qvl <package-name.rpm>

  dpkg -c <package-name.deb>

  显示所有已经安装的软件包:

  rpm -qvia

  dpkg -l

  打印一个包的信息:

  rpm -qpi <package-name.rpm>

  dpkg -I <package-name.deb>

  检验包characteristics:

  rpm -Va

  debsums -a

  检验一个文件属于哪个包:

  rpm -qf </path/to/file>

  dpkg -S </path/to/file>

  安装新软件包:

  rpm -Uvh <package-name.rpm>

  dpkg -i <package-name.deb>

  1127 强制新用户首次登陆后修改密码(猫小)

  #useradd -p '' testuser; chage -d 0 testuser

  1128 日志维护工具logrotate(hotbox)

  在/etc/logrotate.conf中配置,定义log文件达到预定的大小或时间时,自动压缩log文件

  1129 Linux中默认的管理员叫什么(陈绪)

  root

  1130 如何产生一个长度固定(例如文件长度为1M)字节的空文件,即每个字节的值全为0x00(sakulagi)

  dd if=/dev/zero of=/tmp/zero_file bs=1024 count=1024

  1131查看某文件的一部分(陈绪)

  如果你只想看文件的前5行,可以使用head命令,

  如:head -5 /etc/passwd

  如果你想查看文件的后10行,可以使用tail命令,

  如:tail -10 /etc/passwd

  你知道怎么查看文件中间一段吗?你可以使用sed命令

  如:sed –n '5,10p' /etc/passwd这样你就可以只查看文件的第5行到第10行。

  1132 查找当前目录下文件并更改扩展名(零二年的夏天)

  更改所有.ss文件为.aa

  # find ./ -name "*.ss" -exec rename .ss .aa '{}' \;

  1133 patch的使用(天才※樱木)

  语法是patch [options] [originalfile] [patchfile]

  例如:

  patch -p[num] <patchfile

 
 -p参数决定了是否使用读出的源文件名的前缀目录信息,不提供-p参数,则忽略所有目录信息,-p0(或者-p
0)表示使用全部的路径信息,-p1将忽略第一个"/"以前的目录,依此类推。如/usr/src/linux-2.4.16/Makefile这样的文
件名,在提供-p3参数时将使用linux-2.4.16/Makefile作为所要patch的文件。

  对于刚才举的Linux内核
源码2.4.16升级包的例子,假定源码目录位于/usr/src/linux中,则在当前目录为/usr/src时使用"patch -p0
<patch-2.4.16"可以工作,在当前目录为/usr/src/linux时,"patch
-p1<patch-2.4.16"也可以正常工作

  1134 将file.txt里的123改为456(hutuworm)

  方法1

  sed 's/123/456/g' file.txt > file.txt.new

  mv -f file.txt.new file.txt

  方法2

  vi file.txt

  输入命令:

  :%s/123/456/g

  1135 将一个分区格式化为ext3日志文件系统(hutuworm)

  mkfs -j /dev/xxxx

  1136 开启硬盘ATA66(laixi781211)

  /sbin/hdparm -d1 -X68 -c3 -m16 /dev/had

  1137 查看当前运行级别(双眼皮的猪)

  runlevel

  1138 查看当前登陆身份(双眼皮的猪)

  1 who am i

  2 whoami

  3 id

  注意1跟2的小区别

  1139 删除rpm -e删除不了的包(wwwzc)

  1、如果在删除包之前删除了包的目录

  rpm -e --noscripts

  2、如果系统里一个包被装两次(由于某些异常引起的)

  rpm -e multi-installed-pkgs –allmatches

  1140 如何定制用户登录时显示的信息(jiadingjun)

  在/etc目录下放一个名字叫motd的文本文件实现的,例如,建立自己的/etc/motd:

  $cat /etc/motd

  welcome to my server !

  那么,当用户登录系统的时候会出现这样的信息:

  Last login: Thu Mar 23 15:45:43 from *.*.*.*

  welcome to my server

  1141 用命令清空Root回收站中的文件(dtedu)

  cd /var/.Trash-root

  rm -rf *

  1142 在Red Hat上加Simsun.ttc字体(陈绪)

 
 以Red Hat
7.3为例,安装时选取简体中文安装,先复制一个simsun.ttc到/usr/X11R6/lib/X11/font/TrueType,改名为
simsun.ttf;然后进入/usr/X11R6/lib/X11/font/TrueType目录下,运行ttmkfdir >
fonts.dir命令;接着用vi编辑fonts.dir文件,把有simsun.ttf行修改如下:

  simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-ascii-0

  simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso10646-1

  simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-iso8859-15

  simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-iso8859-1

 
 simsun.ttf
-misc-SimSun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0simsun.ttf
-misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0

  simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-m-0-gb2312.1980-0

  simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gbk-0

  接着运行cat fonts.dir > fonts.scale命令,修改/etc/X11/XF86config-4, 在Section“Files”加上下面这一行:

  FontPath “/usr/X11R6/lib/X11/fonts/TrueType”

  最后回到KDE桌面里, 在“开始”→“选项”→“观感”→“字体”,将所有字体改为Simsun

  1143 Unicon和Zhcon的区别和作用(陈绪)

 
 Unicon是内核态的中文平台,基于修改Linux FrameBuffer和Virtual
Console(fbcon)实现的。由于是在系统底层实现的,所以兼容性极好,可以直接支持gpm鼠标。但是相对比较危险,稍有漏洞就可能会危及系统安
全。Zhcon是用户态的中文平台,有点像UCDOS

  1144 如何卸载tar格式安装的软件(陈绪)

  进入安装该软件的原代码目录,运行make uninstall。如果不行,也可以查看一下Makefile文件,主要是看install部分,从其中找出tar格式的文件被复制到了什么路径,然后进入相应的目录进行删除即可

  1145 定制linux提示符(陈绪)

 
 在bash中提示符是通过一个环境变量$PS1指定的。用export $PS1查看现在的值,比较直观常用的提示符可以设定为export
PS1=“[\u@\h
\W]\$”。其中\u代表用户名,\h代表主机名,\W代表当前工作目录的最后一层,如果是普通用户\$则显示$,root用户显示#

  1146 在vi中搜索了一个单词,该单词以高亮显示,看起来很不舒服,怎么能将它去掉(陈绪)

  在vi的命令模式下输入:nohlsearch就可以了。另外可以在~/.vimrc中写上下面的语句就会有高亮显示:

  set hlsearch

  加上下面的语句就不会有高亮显示:

  set nohlsearch

  1147 如何找出系统中所有的*.cpp、*.h文件(陈绪)

  用find命令就可以了。不过如果从根目录查找消耗资源较高,使用下面的命令就可以:

  find / -name "*.cpp" -o -name "*.h"

  1148 如安装Debian需要几张盘就够了?7张盘全部都要下载吗(陈绪)

  如果经常有网络环境的话,下载第一张就可以了。要是没有网络环境的话不推荐使用Debian,因为Debian主要依赖网络来更新软件。实在要安装的话,要下载全部7张盘,否则可能会出现需要的软件包找不到的问题

  1149 Debian第一张光盘为什么有两个版本?debian-30r1-i386-binary-1.iso和debian-30r1-i386-binary-1_NONUS.iso该下载哪一个呢?它们有什么区别(陈绪)

 
 因为含有“non-US”(不属美国)的软件不能合法地存放在架设于美国境内的服务器中。以前,其原因通常是因为软件含有严密的密码编码,而今天,则是
因为程序使用了美国专利保护的演算法。每个人应该取用“non-US”来供私人用途所用;而没有这个标识的iso则只对架设在美国的镜像及供应商才有用
处。其它二进制的光盘则不会含有任何“US-sensitive”(与美国相关的)软件,它们和其它种binary-1光盘一样运作得很好。因此,个人使
用还是下载debian-30r1-i386-binary-1_NONUS.iso版本

  1150 为何我使用umount /mnt/cdrom命令的时候出现device is busy这样的语句,不能umount(陈绪)

  在使用umount的时候一定要确保已退出/mnt/cdrom这个目录,退出这个目录就可以使用umount /mnt/cdrom了

  1151 我使用的是笔记本电脑,怎么才能在控制台下显示现在还剩多少电量呢(陈绪)

  使用apm -m就可以看到还有多少分钟了,具体参数可以用man apm查看

  1152 为什么我进入Linux的终端窗口时,man一条命令出来的都是乱码呢(陈绪)

 
 这是因为你的字符集设置有问题。临时解决办法可以使用export
LANG=“en_US”。要想不必每次都修改的话,在/etc/sysconfig/i18n文件里面修改LANG=“en_US”就可以了。也可以针
对某个用户来做,这样就可以改变个人的界面语言,而不影响别的用户。命令如下:# cp /etc/sysconfig/i18n
$HOME/.i18n

  1153 编译内核的时候出错,提示“Too many open files”,请问怎么处理(陈绪)

  这是因为file-max默认值(8096)太小。要解决这个问题,可以root身份执行下列命令(或将它们加入/etc/rcS.d/*下的init脚本):

  # echo "65536" > /proc/sys/

  最后进入解压后的目录,运行安装命令。

  # cd vmware-linux-tools

  # ./install.pl

  1154 本来装有Linux与Windows XP,一次将Windows XP重装后,发现找不到Linux与Windows XP的启动选单,请问如何解决(陈绪)

  首先光盘启动,进入rescue模式,运行GRUB,进入grub提示符grub>,然后敲入下面的语句,重启就好了。

  root (hd0,2),setup (hd0)

  1155 安装了一台Linux服务器,想自己编译内核,一步一步做下来,GRUB也添加进去了,但出现“kernel Panic:VFS:Unable to mount root fs on 0:00”的错误,请问是怎么回事(陈绪)

 
 一般情况下initrd这个文件在台式机上不是必须的,但是在有SCSI设备的服务器上却是必须的。有可能因为编译内核的时候没有产生initrd那个
文件,所以会有上面的错误提示。用户可以使用mkinitrd命令来生成一个initrd.img文件,然后加入GRUB,重启试一试

  1156 如何设置用户登录后的欢迎信息(陈绪)

  修改/etc/motd文件,往里面写入文本,就能使用户通过Telnet正确登录后,执行Shell之前得到相应的提示信息。

  motd就是“messages of the day”,也就是当日信息的意思。管理员可以往里面写一些需要注意的事项或通知等来提醒正式用户

 
 1157 我下载了rcs5.7,用./configure && make && make
install时报错如下:./conf.sh: testing permissions ... ./conf.sh: This command
should not be run with superuser permissions.
我是以root用户身份登录编译安装的,为什么会这样(陈绪)

  有些软件确实因为考虑到安全等其它原因不能用root用户编译。这时只要用其它用户编译,到make install这步时,如果该软件安装在不属于编译时的用户的主目录下时,需要使用su命令转换为root用户再执行make install

  1158 我在安装USBView时失败,具体情况如下:

  #rpm -ivh usbview-1.0-9.src.rpm warning:usbview-1.0-9.src.rpm:V3 DSAsignature:NOKEY,key IDab42a60e(陈绪)

  这行代码说明安装失败是因为你的系统上没有安装合适的钥匙来校验签名。要使该软件包通过校验,可以通过导入Red Hat的公匙来解决,具体的方式是在Shell下运行如下命令:

  #rpm -import /usr/share/rhn/RPM-GPG-KEY (注意大小写)

  1159 如何防止某个关键文件被修改(陈绪)

  在Linux下,有些配置文件是不允许任何人(包括root)修改的。为了防止被误删除或修改,可以设定该文件的“不可修改位(immutable) ”。命令如下:

  # chattr +i /etc/fstab

  如果需要修改文件则采用下面的命令:

  # chattr -i /etc/fstab

  1160 怎样限制一个用户可以启动的进程数(陈绪)

  先确定一下/etc/pam.d/login文件中下面一行的存在:

  session required /lib/security/pam_limits.so

  然后编辑/etc/security/limits.conf,在里面可以设置限制用户的进程数、CPU占用率和内存使用率等,如hard nproc 20就是指限制20个进程,具体可以看man

  1161 如何限制Shell命令记录大小(陈绪)

 
 默认情况下,bash会在文件$HOME/.bash_history中存放多达500条命令记录。有时根据具体的系统不同,默认记录条数不同。系统中
每个用户的主目录下都有一个这样的文件。为了系统的安全,在此强烈建议用户限制该文件的大小。用户可以编辑/etc/profile文件,修改其中的选项
如下:

  HISTFILESIZE=30 或 HISTSIZE=30

  这样就将记录的命令条数减少到30条

  1162 我想将开机时显示的信息保留下来,以检查电脑出了问题的地方,请问怎么办(陈绪)

  可输入下面的命令:

  #dmesg > bootmessage

  该命令将把开机时显示的信息重定向输出到一个文件bootmessage中

  1163 我想在注销时删除命令记录,请问怎么做(陈绪)

  编辑/etc/skel/.bash_logout文件,增加如下行:

  rm -f $HOME/.bash_history

  这样,系统中的所有用户在注销时都会删除其命令记录。

  如果只需要针对某个特定用户,如root用户进行设置,则可只在该用户的主目录下修改/$HOME/.bash_history文件,增加相同的一行即可

  1164 编译内核,支持ntfs的步骤(platinum,陈绪)

  1. # cd /usr/src/linux-2.4

  2. # make menuconfig

  3. 选中File System下的NTFS file system support (read only)为M

  4. # uname -a

  2.4.21-27.0.2.EL

  5. # vi Makefile

  确保前几行为

  VERSION = 2

  PATCHLEVEL = 4

  SUBLEVEL = 21

  EXTRAVERSION = -27.0.2.EL

  6. # make dep

  7. # make modules SUBDIRS=fs/ntfs

  8. # mkdir /lib/moduels/2.4.21-27.0.2.EL/kernel/fs/ntfs

  9. # cp -f fs/ntfs/*.o /lib/moduels/2.4.21-27.0.2.EL/kernel/fs/ntfs/

  10. # depmod -a

  11. # modprobe ntfs

  12. # lsmod

  确保有ntfs在里面

  1165 如何使用ssh通道技术(陈绪)

  本文讨论所有机器均为Linux操作系统。

  比如说我的机器是A,中间服务器为B,目标服务器是C。

  从A可以ssh到B,从B可以ssh到C,但是A不能直接ssh到C。

  现在展示利用ssh通道技术从A直接传输文件到C。

  1. ssh -L1234:C:22 root@B

  input B's password

  2. scp -P1234 filename root@localhost:

  input C's password

  1166 使用rpm命令时没有任何响应,如何解决(初学摄影)

  rm -rf /var/lib/rpm/__db.*

  1167 向登陆到同一台服务器上的所有用户发一条信息(陈绪)

  1)输入wall并回车

  2)输入要发送的消息

  3)结束时按“Control-d”键,消息即在用户的控制窗口中显示

  1168 输入短消息到单个用户(陈绪)

  1)输入write username,当用户名出现在多个终端时,在用户名后可加tty,以表示在哪个tty下的用户。

  2)输入要发送的消息。

  3)结束时按“Control-d”键,消息即在用户的控制窗口中显示。

  4)对于接收消息方,可以设定是否允许别人送消息给你。

  指令格式为:mesg n[y]

  %write liuxhello! Everybody, I’llcome.

  %

  用户控制窗口中显示的消息:Message from liux on ttyp1 at 10:00…hello! Everybody, I’llcome.EOF

  当使用CDE或OpenWindows等窗口系统时,每个窗口被看成是一次单独的登录;如果用户登录次数超过一次则消息直接发送到控制窗口

  1169 发送文件中的消息到单个用户(陈绪)

  如果有一个较长的消息要发送给几个用户,用文件方式:

  1)创建要发送的消息文本的文件filename.

  2)输入write username<filename回车,用cat命令创建包含短消息的文件:

  % cat>message hello! Everybody, I’ll come.

  % write liux<message write:liux logged in more than once…write to console

  % 用户在一个以上窗口登录,消息显示在控制窗口中Message from liux on ttyp1 at 10:00…hello! Everybody, I’ll come. EOF

  1170 向远程机器上的所有用户发送消息(陈绪)

  使用rwall(向所有人远程写)命令同时发送消息到网络中的所有用户。

  rwall hostname file

  当使用CDE或OpenWindows等窗口系统时,每个窗口被看成是一次单个的登录;

  如果用户登录次数超过一次则消息直接发送到控制窗口

  1171 向网络中的所有用户发送消息(陈绪)

  发送消息到网络中的所有用户

  1)输入rwall -n netgroup并回车

  2)输入要发送的消息

  3)结束时按“Control-d”键,消息即在系统每个用户的控制窗口中显示,下面是系统管理员发消息到网络组Eng每个用户的例子:

  % rwall -n EngSystem will be rebooted at 11:00.(Control-d)

  %

  用户控制窗口中的消息:Broadcast message from root on console…System will be rebooted at 11:00.EOF

  注意:也可以通过rwall hostname(主机名)命令到系统的所有用户

  1172 我需要编译内核,内核源码在哪里?(platinum)

  1、一般在发行版的盘里都有,比如 RedHat,一般在第二、第三张上

  2.4 内核的叫 kernel-source-2.4.xx-xx.rpm

  2.6 内核的叫 kernel-devel-2.6.xx-xx.rpm

  2、去 www.kernel.org 下载一份你喜欢的

  1173 将top的结果输出到文件中(bjweiqiong)

  top -d 2 -n 3 -b >test.txt

  可以把top的结果每隔2秒,打印3次,这样后面页的进程也能够看见了

  1174 vim中改变全文大小写的方法(陈绪)

  光标放在全文开头

  gUG 所有字母变大写

  guG 所有字母变小写

  g~G 所有字母,大写变小写,小写变大写

  2 网络相关篇

  2001 让apache的默认字符集变为中文(陈绪)

  vi httpd.conf,找到 AddDefaultCharset ISO-8859-1 一行

  apache版本如果是1.*,改为 AddDefaultCharset GB2312

  如果是2.0.1-2.0.52,改为 AddDefaultCharset off

  然后运行/etc/init.d/httpd restart重启apache即可生效。

  注意:对于2.0.53以上版本,不需要修改任何配置,即可支持中文

  2002 永久更改ip(陈绪)

  编辑/etc/sysconfig/network-scripts/ifcfg-eth0文件,修改ip,然后执行ifdown eth0; ifup eth0

  2003 从Linux上远程显示Windows桌面(lnx3000)

  安装rdesktop包

  2004 手动添加默认网关(陈绪)

  以root用户,执行: route add default gw 网关的IP

  想更改网关

  1 vi /etc/sysconfig/network-scripts/ifcfg-eth0

  更改GATEWAY

  2 /etc/init.d/network restart

  2005 redhat 8.0上msn和qq(陈绪)

  下载Gaim 0.58版:

  gaim-0.58-2.i386.rpm

  下载QQ插件 for gcc2.9版:

  libqq-0.0.3-ft-0.58-gcc296.so.gz

  将下载的文件放入/temp目录,然后将系统中已有的Gaim删除,即在终端仿真器中键入命令:rpm -e gaim。

  开始安装

  打开终端仿真器,继续执行下列命令安装Gaim 0.58版,即:

  cd /temp

  (进入temp目录)

  rpm -ivh gaim-0.58-2.i386.rpm

  (安装软件)

  当安装成功后,你就可以在GNOME或KDE桌面建立Gaim图标了。

  继续安装QQ插件,即键入命令:

  gunzip libqq-0.0.3-ft-0.58-gcc296.so.gz (解压缩文件)

  cp libqq-0.0.3-ft-0.58-gcc296.so /usr/lib/gaim (复制插件到gaim库目录中)

  软件设置

 
 首次启动Gaim
0.85版时,会出现的登录界面。先选择“插件”,在插件对话框中点击“加载”,分别将libmsn.so和libqq-0.0.3-ft-0.58-
gcc296.so文件装入,确认后关闭。然后再选择“所有帐号”,在出现的帐号编辑器中继续点击“增加”,当出现的修改帐号页面时,我们就可以输入自己
的QQ或MSN号了,登录名填写QQ号码或MSN邮箱,密码填写对应的QQ或MSN密码,Alias填写自己的昵称,协议选择相应的QQ或MSN,其他的
设置按默认的即可。当全部设置完成后就可以登录使用了。

  Fedora core 5中的gaim,缺省对msn就可以支持,加上gaim的qq插件,即可支持qq

  2006 查出22端口现在运行什么程序(陈绪)

  lsof -i :22

  2007 查看本机的IP,gateway,dns(陈绪)

  IP:以root用户登录,执行ifconfig。其中eth0是第一块网卡,lo是默认的设备

  Gateway:以root用户登录,执行netstat -rn,以0.0.0.0开头的一行的Gateway为默认网关

  也可以查看/etc/sysconfig/network文件,里面有指定的地址

  DNS:more /etc/resolv.conf,内容指定如下:

  nameserver 202.96.69.38

  nameserver 202.96.64.38

  2008 RH8.0命令行下改变ping 的TTL值(cgweb,lnx)

  方法1(重启后有效):

  #sysctl -w net.ipv4.ip_default_ttl=N

  (N=0~255),若N>255,则ttl=0

  方法2(重启后无效):

  #echo N(N为0~255) > /proc/sys/net/ipv4/ip_default_ttl

  2009 开启LINUX的IP转发(houaq)

  编辑/etc/sysctl.conf, 例如,将

  net.ipv4.ip_forward = 0

  变为

  net.ipv4.ip_forward = 1

  重启后生效,用sysctl -a查看可知

  2010 mount局域网上其他windows机器共享出的目录(陈绪)

  mount -t smbfs -o username=guest,password=guest //machine/path /mnt/cdrom

  2011 允许|禁止root通过SSH登陆(Fun-FreeBSD)

  修改sshd_config :P ermitRootLogin no|yes

  2012 让root直接telnet登陆(陈绪,platinum)

  方法1:

  编辑/etc/pam.d/login,去掉

  auth required /lib/security/pam_securetty.so 这句话

  方法2:

  vi /etc/securetty

  添加

  pts/0

  pts/1

  ...

  2013 在linux接adsl设备(wind521)

  需要一个运转正常的Linux + 至少一块网卡 + 宽带设备已经申请完毕,同时已经开通。目前市场上大概有几种ADSL设备,他们工作的方式有一些细微的差别。

 
 就是通过虚拟拨号来完成上网的这一过程,也就是利用pppoe设备来进行虚拟拨号的叫作全向猫,就是一种加电后自动的进行拨号的工作,然后留给我们的接
口是RJ45,大连地区一般留给我们的网关都是10.0.0.2,这种设备最容易对付,最后是直接分配给用户一个固定的IP,相对大家来说也比较容易对付

  1.第一种需要进行拨号:

  这几种设备都是通过eth接口与计算机进行通讯的,所以先将硬件设备的连接作好,尤其是宽带猫的,一定要确认无误(否则一会儿要不去可不算我的事情)

 
 然后启动系统,确认系统上是否安装rp-pppoe这个软件(通过rpm -qa|grep
pppoe来查找),如没有安装的用户,在光盘里或是到网上去down一个来,安装上后,以root用户执行adsl-setup,这样就进入了adsl
的资料的设定状态,要求输入申请宽带的用户名以及其他一些信息,确认没有问题,接受直至最后(里面都是E文,但是一看即能懂,比较简单,有关一个防火墙的
设置,我一般都不用,选0,大家可以具体考虑)。

  配置完成后,以root用户执行adsl-start,这样将进行adsl的拨号工作,正常就会一下上线,如有什么具体问题,去看一下日志(/var/log/messages)里面告诉你什么了。

  停掉adsl,执行adsl-stop就可以了(很简单的)

  2.另外两种比较容易对付:

  全向猫:只要将你的网卡的IP设置成一个10网段的IP,然后网关指到全向猫的IP,上(10.0.0.2),基本上不有太大的问题

  固定IP:就像配置本地的网卡一样,将IP,网关,DNS都按申请来的填写上就可以搞定了

  2014 让linux自动同步时间(shunz)

  vi /etc/crontab

  加上一句:

  00 0 1 * * root rdate -s time.nist.gov

  2015 linux的网上资源有哪些(陈绪)

  国外

  http://lwn.net/

  http://www.tldp.org/

  http://www.yolinux.com/(flying-dance big big pig)

  http://www.justlinux.com/

  http://www.linuxtoday.com/

  http://www.linuxquestions.org/

  http://www.fokus.gmd.de/linux/

  http://www.linux-tutorial.info/

  http://public.www.planetmirror.com/

  http://www.freebsdforums.org/forums/

  http://www.netfilter.org/documentation/

  http://www-106.ibm.com/developerworks/linux/

Powered by ScribeFire.

Leave a comment

珍珠插植

(一)无核珍珠插植

    1.育珠蚌的选择与暂养

    (l)育珠蚌的选择 蚌体1厘米以上,制片蚌2~3龄,插片蚌2~4龄,
或用体长5一7厘米、1一2龄的蚌,采用所谓的“三小”育珠法(小蚌、小片、小工具)。蚌体完整无伤,表面光泽好,生长年轮线宽,较明显,斧足肥壮饱满,
受惊后两壳闭合迅速,强劲有力,喷玉枕纱厨水远。

    (2)育珠蚌的暂养 幼蚌是自育且用吊养法培育的,可直接进行手术不需要进行暂养;如底养
的或从外地购进的幼蚌,必须进行暂养,然后进行手术。将蚌放入聚乙烯网袋中(每袋放10只)吊养,吊养量为每平方米4~5只,可在暂养池中吊养,也可在手
术后的暂养池中吊养,须保持水质较肥。暂养时间一般为30~40天。

    2.手术操作

    (1)手术操作时间一般以春、秋季为佳,水温以15~28℃为宜,以18~22℃为最佳。

    (2)手术前的准备

    ①洗蚌 将蚌体洗刷干净,将制片蚌和插片蚌分别移入小水池或盆中,插片蚌的腹部朝上,让其自然开口,以减少开壳机械损伤。

    ②工具 送片针针头大l~l.5毫米,带有微小针刺,根据用蚌大小选用;钩针具270°的弯弧、钩宽1~1.5毫米;塞子厚度不超过10毫米;其他工具有手术架、手术刀、镊子、海绵、玻璃板、拨鳃板等;小片保养水用蒸馏水,如用冷开水应先沉淀。工具都应消毒。

    (3)小片制取

    ①
开壳取膜 剖开制片蚌,注意使外套膜完整地黏附在蚌壳上;用湿海绵轻轻洗去边缘膜上的污物,然后用剪刀从边缘膜的前端开小口,用通片针等工具将内外表皮分
离,用刀片刈下外表皮后,再用镊子将对下的外表皮膜条反拉在玻璃板上,原来贴壳的一面向上,用海绵轻擦去表面上的黏液。剥离的膜片厚度要求均匀,为0.5
一0.8毫米。

    ②修边切片 用手术刀将膜片边缘的色线全部切除,再切成4毫米x6毫米长方形小片,做到完整无伤。小片一经切好,就
要用滴管滴上小片保养液,以保持小片湿润,并要防止直射阳光照到小片上。必须注意的是小片不能久放,一般要求从制片开始到插入育珠蚌外套膜整个过程在15
分钟内完成。

    (4)小片插送

    ①开壳 用开口器将堆放在小池或盆中的插片蚌轻轻开口加塞,切忌开口过大或强行开口,以免损伤蚌体和闭壳肌。开壳后若发现蚌体软体部位有水肿、外套膜脱壳或发黑发红、闭壳肌受伤、鳃腐烂等现象,不能用作插片蚌。

    ③
插片 加塞的插片蚌放手术台上或放在一小碗内,用碎布固定,然后用拨鳃板或手术针将鳃和斧足拨到暂不送片的一侧,用海绵擦专植片部位的污物。插片采用横插
法。插片部位:三角帆蚌以中后部区域为好;把纹冠蚌则以后端的外部、中部、中间的边缘部为好。插片时,一手用送片针刺住小片正中并挑起,另一手用钩针在植
片部位的内表皮上开一小孔,将用送片针挑起的小片送入内、外表皮间的结缔组织中,深6~7毫米。要求小片一次送入,并用钩针使小片固定在伤道的顶端,然后
整圆,切忌将外表皮戳破,以免形成贴壳珠。这时,插片即完成,再插另一片。插入小片的间距约0.8厘米,每边可插3排,呈品字形排列。一面插好后再插另一
面。插片要从后端到前端,从边缘到中心。插片要尽量做到同位移植,使组织易愈合,有利于提高珍珠的产量和质量。每只蚌插片的数量视育珠蚌的大小而异,一般
7厘米的育珠蚌可插片45个左右。插片后的育珠蚌要及时放入清水中暂养。一般每半天挂蚌l次,挂蚌操作要特别注意不要使蚌体离水。

    由于插植无核珍珠所用蚌体较小,采用翼部钻孔串吊法易使蚌体受伤或脱落,故目前大都采用袋吊法。

    (二)有核珍珠插值 将人工制备的珠核和细胞小片插入蚌体后形成的珍珠称有核珍珠。有核珍珠产品价值高,可育出大型珍珠。相比之下,有核珍珠插植技术的难度要比无核珍珠插植技术难度大。

    1.育珠蚌的选择和暂养 有核珠的育珠蚌以三角帆蚌为好。制片蚌以2~3龄为宜,个体长为8~12厘米;育珠蚌以3一5龄为宜,体长为15一20厘米,体质健壮。蚌的暂养水域条件和方法与无核珍珠相同。

    2.手术操作

    (1)手术时间 一般在3一5月和9~11月,水温以18一25℃为宜。

    (2)手术前准备

    ①工具 除准备好做无核珠的全套工具外,还应再增加眼科用弯头镊子、开膜刀、送核器、伤口拉钩、通条针等。

    ②核 选用背瘤丽蚌等贝壳经切刈、打角、漂白、抛光后成正圆形的珠核,其规格有3~12毫米共10档,可根据育珠要求选定,核使用前应经肥皂洗净并煮沸消毒。

    (3)小片制备 小片制备与无核珠相同,但规格较小,一般以2毫米见方为好。如与核大小相比,为珠核直径的1/3较合适。过大,虽然形成珍珠速度快,但易产生有尾珠、皱纹珠和污珠;过小,小片容易失落。

    (4)小片与核的插送 插送部位以蚌外套膜后半部和边缘膜或中央区较好。在内脏团的性腺侧区可插大核。插送方法有三种:

    ①核先放式 先将核送入伤口底部再插入小片。

    ②核后放式 先送小片到伤口底部,再送核使之紧贴。

    ③核片同送法 把小片贴在核的小孔上,同时送入伤口底部,此法较有效。插送有直插、横插两种,细胞小片外表皮应紧贴珠核,插核伤口略大于珠核。

    (5)插核数量 一般体长15一20厘米的手术蚌,每边可插8毫米以上大核4一6粒或小核8~12粒,内脏团可各插l粒,合计可插18粒。

    3.
有核育珠蚌的管养 有核育珠蚌伤口大,不能手术后就吊养,否则容易吐核。要先用笼养,在箱底垫一层纱布,再把手术后的蚌平放在笼里,每隔1~2天把蚌翻动
l次,以保持左右外套膜受核压力的平衡。如发现脱离的核应及时拾起,发现死蚌立即清除。一般需要精心管养2一3年,才能育出大而圆的有核珍珠。

    (三)像形珍珠插植 将各种像形浮雕插入蚌壳与外套膜间,由插片蚌外套膜分泌珍珠质,附着在浮雕表面,日积月累,形成像形珍珠。像形珍珠实际上是一种附壳珍珠,手术方法并不复杂,养殖也不难。

    1.育珠蚌的选择 如果选用三角帆蚌作为育珠蚌以3~5龄为宜,体长为14~18厘米;褶纹冠蚌以3一5龄为宜,体长为10~20厘米,蚌体健壮。

    2.手术时间 一般在每年4~9月,当水温17一30℃时可以手术,最适手术期为6一8月,水温为22一28℃。手术应避开繁殖期。

    3.
模型材料及其制备 模型材料可用铅、铝、硬塑料,以质地坚硬光滑的陶瓷、寿山石、玉石、蚌壳和熔点为56~58℃的切片石蜡为好。因其比重和膨胀系数和珍
珠层基本相似,不易造成珍珠层爆裂或脱落。模型的雕刻要精细,纹理要分明,形象要清晰,使育成的像形珍珠富有立体感。模型贴壳的一面要有一定的弧度,使其
紧贴贝壳,不留空隙,防止污泥进入。模型可制成各种人物、动物和风景等。模型大小应小于育珠蚌中央模,长度不超过蚌长度的2/3,厚度为0.3一0.5厘
米。

    4.手术操作程序

    (1)开口 将手术蚌置于手术台上,开壳插塞。用手术刀从前端下切,剥离外套肌,开口大小应比模型宽度略大1厘米为宜。

    
(2)送模 1只育珠蚌可送2个像模,但要分次插送。操作时先用湿海绵球擦净中央膜处手术部位,一手用通片针挑起剥离的外套膜,另一手拿像模的一端,正面
向上,底面贴壳,以45°角慢慢地从伤口送进,用拨模棒调整像模位置,并轻轻压一下外套膜,使与像模紧贴。送模时应注意平拿平放。

    (3)取塞 在送模一侧的蚌壳上刻好日期、制作人姓名等标记,用细绳扎好蚌壳,以防像模脱出。

    (4)再手术 将手术后的蚌放笼内,送模一例向下平放,移养水面中,最好一蚌一笼。饲养15一20天,使蚌体恢复体质,像模已基本固定后取出,再重复上述手术方法在另一侧送入像模,并及时移入养殖水域。一般养殖1一2年可以采收。

    
(四)彩色珍珠插植 彩色珍珠有自然呈色和人工珠核染色两种。无核珍珠的自然呈色是根据珍珠层本体色的遗传性质,通过细胞小片移植形成,它和制片蚌珍珠层
的色泽有直接关系,也和养殖水域、光照条件以及蚌的种类、年龄有关。彩色珍珠手术操作与无核珠相同。人工控制珍珠自然呈色的方法有以下两种:

    1.从异种移植控制珍珠呈色

    (l)自褶纹冠蚌切取的小片移植到三角帆蚌体内,多产金色珍珠,出现率为46%~73%。

    (2)由背角无齿蚌切取的外套膜细胞小片移植到三角帆蚌体内,多产浅红色珍珠,出现率为37%~48%。

    (3)由圆背角无齿蚌切取的小片移植到褶纹冠蚌体内,多产桃红色珍珠,出现率为40%左右;而移植到三角帆蚌体内,则多产粉红色珍珠。

    2.从不同蚌龄的移植控制珍珠呈色

    (1)由老年三角帆蚌切取外套膜小片移植到同种低龄蚌体内,多产橙黄色珍珠,出现率为68%左右。

    (2)由低龄三角帆蚌切取细胞小片移植到同种低龄蚌体内,多产米黄色珍珠,出现率为52%左右。

Powered by ScribeFire.

Leave a comment

插核

二、制作细胞小片
细胞小片来源于珍珠母贝的外套膜组织,它是形成珍珠囊并分泌珍珠
的物质基础,因此在制作时要特别小心。细胞小片贝是指用于制作细胞小片的贝,一般选用同种贝。小片的制作方法是,用剪刀从小片贝体上取出外套膜的游离部
分,用清洁海水洗净,并进行修整,切除边缘部分,然后将其切割成方块状,大小为珠核直径的1/3。切成的方块小片,先用2%红汞消毒染色,之后用清洁海水
浸润待用。

三、插核
合浦珠母贝的插核法有三种:表面贴片插核法、滚核推片插核法和先送片后送核插核法。插核前,先将栓口的母贝,
右壳向上,左壳向下,置于插核台上,用平板针拨开母贝右核边的鳃叶,使其露出软体部,同时用棉花擦去软体部位和壳口附近的污泥和粘液,然后在足的基部黑白
交界处用切口刀开一个切口,大小以刚好能送进珠核、深度以刚好切开表皮为准。接着将通道针插进切口,分别沿着“左袋”和
“右袋”
方向拨通送核道,再用左手拿1勾针或平板针勾住或压住手术贝的足,右手拿送核器分别将大核和中核送到“左袋”和“右
袋”中去。贝体右侧核位插完后立即将手术贝反转过来,即母贝右壳向下,左壳向上,在贝体的左侧足的基部黑白交界处开一切口,并用通道针从切口
向“下足”拨通送核道,接着以右手拿针压住手术贝的足,左手抓送核器将小核送到“下足”部位。每个核位
送核之后,立即用送片针把一块细胞小片送贴于核面上。贴片时务必将小片外表皮紧贴于核面。手术完毕取出木塞,将施术贝暂养于水盆中即可,这就是先插核后送
片表面贴片插核法。

滚核推片插核法要点是将核送到通道半途,然后将小片贴在核面上,接着用通道针慢慢滚核推片一起送达部位。先送片后送核
插核法操作比较容易,切口、通道做好后,先用送片针把小片送入“部位”,但必须小心,送入部位的小片,其外表皮要朝通道口的方
向。然后,再用送核器把核送到部位压住小片外表皮。手术完后,取出栓口木塞,将贝暂养于水盆中。以上三种方法,所产生的效果各不相同,前者育成的珍珠质量最好,圆形者占比例较多,后二者育珠质量较差,污珠和尾巴珠较多。

Powered by ScribeFire.

Leave a comment

pearl

"The Perfect Pearl"

PBS Airdate: December 29, 1998
Go to the companion Web site

[During the following program, look for web markers like this, which lead you
to expanded coverage on our web site.]

NARRATOR: Tonight, on NOVA, lives were imperiled, fortunes spent, to possess a
precious gem plucked from the sea. For centuries, its mystique centered on the
mystery of its origins: an accident of nature, or a product of human
engineering?

NICHOLAS PASPALEY: For this particular lot of shells, everything went right.

NARRATOR: Has science unlocked the secret of the perfect pearl?

__: Major funding for NOVA is provided by the PARK Foundation, dedicated to
education and quality television. And by Iomega, makers of personal storage
solutions for your computer, so you can create more, save more, share more, and
do more of whatever it is you do. Iomega, because it's your stuff. This program
is funded in part by Northwestern Mutual Life, which has been protecting
families and businesses for generations. Have you heard from the quiet company?
Northwestern Mutual Life. And by, the Corporation for Public Broadcasting and
viewers like you.

NARRATOR: Of all of the world's gems, it is the pearl which has held the
greatest fascination for humans. So powerful is the pearl's allure, that for
thousands of years, people have risked their lives to rest this perfect jewel
from the ocean's depths. Today's cultured pearls are produced in their millions
in a remarkable collusion between nature and science.

NARRATOR: But as science continues to perfect the techniques for pearl
culturing, nature is not always a willing partner.

NARRATOR: Pearl oysters are sensitive creatures, susceptible to even subtle
changes in the environment. They are a member of the mollusk family, one of the
most successful species on earth. Mollusks have been around for at 530 million
years, and have evolved into over 130,000 living species.

NARRATOR: All types of mollusks can produce something resembling a pearl, but
relatively few species create the lustrous objects we prize as gems.

NARRATOR: The quest to uncover the secrets of the pearl oyster has been a
lifelong passion for zoologist John Lucas, an international mollusk expert.

JOHN LUCAS: This is the body of the pearl oyster. There's the inside of the
shell, the lustrous nacre or the shiny bit that make the pearl oyster. And one
of the most dominant things is this large muscle here, which pulls the two
shells together, so that when you try to pull it apart, this muscle resists.
And these do have predators, fish and crabs and things that try to break them
apart, and the animal depends on that adductor muscle to hold the shells
together and resist the predator.

Oysters are found all over the world. Many of them are found in estuaries and,
typically, the ocean, but pearl oysters are more tropical animals. What oysters
like is a place where there is lots of algae in the water, because they are
filter feeders; they just sit there filtering water all of the time and getting
algae cells from the water. So they're really looking for a spot where the
water has lots of food for them, so there are good currents, and things like
that.

NARRATOR: Currents also carry foreign material which can enter the shell.
Normally, the oyster can expel any irritant that finds its way inside. But
sometimes a piece of shell or coral catches in its delicate flesh. If it can't
get rid of this foreign matter, the oyster isolates it inside a membrane or
pearl sack that secretes nacre, the same smooth substance called mother of
pearl that lines its shell. The irritant is slowly plated with translucent
layers of calcium carbonate crystals, which make the irritant smooth and
tolerable to the oyster.

KRISTIN JOYCE: Pearls cast a glow. There is a property that's called orient, a
manner in which the pearl actually casts light. And this is the essence of
pearls.

KRISTIN JOYCE: You're speaking about a gemstone that's pure and perfect, as
it's plucked from a mollusk, from an oyster. One can only imagine how amazing
it must have been for the first man, for the first woman, to discover this,
have no idea whether they should worship it, eat it, wear it. But shamans, and
the mystics, and the alchemists, and early man, who is worshipping the sun and
the moon, would have been drawn to something like pearls, like no other
stone.

NARRATOR: Throughout history, the pearl has been passionately sought after by
kings and queens, emperors, and maharajahs. As valued in the West as in the
East, pearls proclaim their owner's wealth and power, and were often the
currency of romance.

__: I should love to have a man dive twenty fathoms to bring me up a pearl.

__: And if I were that man, what then?

__: Then, I might be very kind to you.

NARRATOR: Even after the introduction of underwater breathing systems, diving
for pearls remained dangerous and unpredictable. Shark attacks and accidents
took their toll, along with the diver's disease known as the bends, WHERE nitrogen bubbles form in the blood stream.

NARRATOR: Sometimes divers were forced to dive too deep, or stay below too
long. The human passion for pearls took a heavy toll.

NARRATOR: Natural pearls are always rare, exquisite accidents of nature. And
when discovered, they're almost never perfectly round. They come in an infinite
variety of shapes. Formations, bumps, and half-domes, that grow against the
shell's interior surface are called mabes.

NARRATOR: Some pearls grow into irregular and, sometimes, fantastic forms
called baroques. A baroque is created when an oyster is unable to turn the
foreign object inside its shell, causing the layering of nacre to build up
unevenly.

NARRATOR: The mystique of the pearl centered on the mystery of its origins.

FRED WARD: There are several instances in history where people actually
wondered how these pearls came into existence naturally, and if they could do
anything to induce an oyster to make a pearl on command.

NARRATOR: The first known example of pearl culturing came in the 12th century,
when the Chinese produced little pearl Buddhas by sliding figurines into
freshwater mussels between the body and the shell. The practice of inducing
mollusks to make pearls goes back more than 1,500 years.

NARRATOR: As early as the 5th century, the Chinese produced pearls by inserting
small objects, including images of Buddha, between the shell of a freshwater
mussel and its nacre-producing mantle.

FRED WARD: And that technology never got out of China. It now seems relatively
simple. This is not rocket science. It's a relatively simple process, in fact.
But it baffled people for at least hundreds of years, and maybe thousands.

NARRATOR: It wasn't until the end of the 19th century that a technique for
culturing pearls was invented in Japan. At last, the natural process could be
duplicated.

NARRATOR: The essential discovery was made by the son of a noodle shop owner,
Kokichi Mikimoto. After twenty years of exhaustive research and many
disappointments, he founded Japan's cultured pearl industry.

FRED WARD: Mikimoto's dream was not just to make a pearl; his dream was to make
a round pearl. He knew the world wanted and would buy a round pearls, if you
could make rounds on demand. So it took a long time. He tried every conceivable
product that he could grind and make into a sphere to push into an oyster to
see if he could induce it to coat it and make a pearl -- soap, wood, metal,
glass -- until he finally found a product that did. It was a sphere made out of
a freshwater mussel shell, which happened to come from the United States.

NARRATOR: Mikimoto had discovered a natural irritant which the oyster wouldn't
reject. But these implanted beads were still not being consistently coated with
nacre. Another ingredient was needed. Fortunately, two other Japanese
experimenters found the answer, which Mikimoto would later license.

FRED WARD: And the secret turned out to be that the thing that would induce an
oyster to coat the foreign object is a small piece of mantle tissue from
another oyster. Once you sacrifice one oyster, you cut the lip -- the mantle
tissue -- into small pieces, make a slit in the oysters, put in the foreign
object, and put in a little piece of tissue -- bingo, the secret is now
revealed. That's what makes a cultured pearl.

NARRATOR: In this procedure called nucleation, mantle tissue from another
oyster induces the formation of a pearl sack around the irritant bead. That
pearl sack then secretes nacre, and, over a period of time, produces a cultured
pearl.

NEWSREEL: Under these waters, there is a king's ransom in cultured pearls
forming around the previously planted beads, and Mikimoto's famous girl divers
go down for the harvest.

NARRATOR: Mikimoto also invented a system for farming oysters. His divers
gathered wild akoya oysters, which thrived in the sheltered coastal
waters of Japan. Once they'd been nucleated, the oysters were caged and
suspended from rafts and left to grow for four years, to produce a thick
coating of nacre.

NEWSREEL: Now begins the search for the pearls themselves, and the haul is a
rich one. From an irritant planted in the oyster, a pearl is born. And on
Mikimoto's farm, a bumper crop is harvested. Sparkling gems for export,
prosperity for Japan.

NARRATOR: Mikimoto wasn't just a remarkable innovator. He was also a brilliant
business man and promoter. He worked tirelessly to have his cultured pearls
accepted as true gems.

FRED WARD: He actually made the world accept the product as pearls, without a
disclaimer about them, that they were almost pearls, or man-made pearls, or
anything of that sort. The word "cultured pearl" became accepted, legal, and
satisfactory all around the world.

NEWSREEL: Glamorous Gloria Swanson, well guarded, arrives at the Waldorf,
wearing the world's most expensive gown. The dress is covered with 100,000
cultured pearls. It is worth $100,000 dollars, and weighs thirty pounds, as
Miss Swanson can tell you.

KRISTIN JOYCE: What was remarkable about Mikimoto was that he was truly a
marketing genius. He had the ability to take his discovery, so to speak, beyond
the borders of Asia, into Europe, and the United States. And I think because he
brought pearls to the masses, in so many different forms, and was able to offer
them at various prices, that he changed the face of pearls, in terms of
jewelry.

NARRATOR: Mikimoto invented the process for culturing pearls in Japan's Ago
Bay. Today, dozens of large pearl companies cultivate oysters in the bay.

NARRATOR: Small oysters, like the akoya, usually cannot tolerate
nucleation more than once. Most will be killed during harvesting when the
pearls are separated from the flesh.

NARRATOR: The Japanese Akoya, Pinctada imbricata,

produces pearls between two and ten millimeters in size, the industry standard
for many decades.

FRED WARD: The other side of that story is that, first of all, the Mikimoto
company perceived this as their secret. As the decades went on, other people,
other Japanese companies were, because people do talk, discovering the secret.
But, the Japanese tried to make it the Japanese secret, that no one else should
know how to culture. No one should know where to place the bead. No one should
know about the mantle tissue addition. They wanted it to be a national
treasure. And they successfully did that by making their workers swear that
they would not reveal it to other people. It was a long held secret.

FRED WARD: So when they would go out into other countries, like Burma, or,
ultimately, into Australia, it was always with Japanese technicians. It was
always with an entire contingent of folks to come and do the process to
nucleate the oysters, and to harvest the oysters, and to take the product back
to Japan to sell. So it was a virtual global monopoly.

NARRATOR: Japan's pearling industry expanded beyond its boarders to other
Pacific shores in search of larger South Sea oysters. In the late 1950s, the
Japanese arrived in Australia, helping to establish the countries first
cultured pearl farm in the Kimberly region.

NARRATOR: Australia is home to the Pinctada Maxima, the world's largest
oyster, producer of the biggest and most expensive pearls. It can live up to
twenty years, growing to the size of a dinner plate.

Long before the arrival of pearl culturing methods, these mighty mollusks were
harvested for their precious mother of pearl.

Throughout the century, they formed the basis for Australia's pearl shell
industry.

NICHOLAS PASPALEY: In the 1800s, late 1800s, when the Australian pearl beds
were first discovered, it was only a matter of two or three years after the
discovery before these beds were supplying the world, the whole world, with 75
percent of the world's shell requirements, you know, for buttons, inlay, knife
handles, gun handles, all these sort of things.

NARRATOR: The environment in this remote region proved ideal for sustaining a
large, healthy population of pearl oysters.

NICHOLAS PASPALEY: This Eighty Mile Beach area, this has the world's most
unique, fantastic shell beds. There's no other shell bed like this in the
world. It's unique because it has this fabulously clean Indian Ocean.

NARRATOR: These shell beds are swept by an exceptionally high tidal flow,
providing the oysters an abundant supply of food.

NICHOLAS PASPALEY: So the only place that oysters will really proliferate is
where you've got an abundance of plankton, so you need a rich ocean, you need a
tide carrying the plankton to the oyster, because the oyster can't move, it's a
filter animal, so it doesn't do very well if it's competing for plankton.
Eighty Mile Beach has got all of that, but, at the same time, it has sand and
silt coverage, which prevents other creatures from growing. And you have a
unique situation where the tides run in-shore and out-shore, northwest,
southeast. And so what you have is spawnings are carried from each reef, across
the reefs, back in shore, and then out across these things and so you get a
continual regeneration of the shell stocks.

NARRATOR: Nick Paspaley now runs a modern pearl culturing operation along these
shores. His father began the business in the 1930s, harvesting oysters long
before the arrival of Japanese culturing methods. In those days, gem quality
pearls were rare, and the business of the day was in the profit the shells
could bring.

NICHOLAS PASPALEY: All my father ever did really, was live pearling, and so it
was sort of a big part of my life. All my childhood experiences were out in
luggers, and with my father at the shell sheds, and down in the engine rooms,
and things. I remember, as a little guy, the hours that my father and some of
the other pearlers would stand around the veranda, with a couple of pearls in
their hand, and I don't know what they spoke about, but they'd be there for
hours discussing this particular pearl. And they just had a passion for pearls,
and the industry, that's all they knew. And, to them, there was nothing else
outside of that world.

But perfectly round pearls were very, very rare. In my father's whole lifetime
as a pearler, he wouldn't have been able to put one string of perfect pearls
together.

NARRATOR: Nick's father became one of the first Australians to move into pearl
culturing, and, in 1958, he established a farm with Japanese and American
partners.

NARRATOR: Oysters were gathered in the wild. But instead of killing the oysters
for their shells, the live animals were transported to sheltered bays and used
as raw stock to cultivate pearls. Japanese technicians were employed to make
use of their proven, but still secret culturing techniques. The Japanese also
brought their oyster farming methods.

NARRATOR: They crowded together the large Australian shells, 5,000 or more,
suspended from a single pontoon. But disaster struck. 60 percent of the oysters
died, and those that survived produced only a few gems quality pearls. Clearly,
Paspaley would have to find new methods.

NICHOLAS PASPALEY: The first thing he did with me when I came back from
university was send me out to the pearl farm to solve some of the problems. And
one of the biggest problems was that the systems they were using were the
Japanese systems. They were fine for the Japanese shell, but they were
unsuitable for the Australian shell. When I was diving, picking up pearl
shells, I could see the difference immediately between the health of those
shells and their appearance and the shells in the pearl farm situation. So, my
ambition was to keep all pearl shells in the same condition that they were in
when I found them.

NICHOLAS PASPALEY: Well, the Japanese shell is much hardier than the Australian
shell. It will live under much higher concentrations. It requires less
plankton, its stress levels are much higher. The Australian shell will not
respond in the same manner as the Japanese shell to the same treatment. And to
clean the shells, what you had to do, you had a team of workers that physically
went to the raft, pulled up the baskets, tipped them out of the baskets, and
they got to work with tomahawks and chopped all the barnacles off.

NICHOLAS PASPALEY: Soon, it became obvious to me that, by three months, the
shell was close to death and the shell never had a chance to produce a
pearl.

NARRATOR: Unable to roll in the surf, captive oysters quickly become smothered
by barnacles. To avoid this, oysters were winched onboard and put through
cleaning machines every few weeks. The oysters' health did improve. But other
problems remained. The harbor water was becoming less pristine and overcrowding
was a growing concern.

Ten years of experimentation led to a simple, but expensive, solution:

To take the entire pearl culturing operation out to sea.

NARRATOR: Now, every year from June till September, Australian crews and
Japanese technicians live and work in an environment more beneficial to the
health of the oysters. This floating enterprise is a high-tech solution to the
threat of oyster mortality. But it is a solution few can afford.

NARRATOR: In Japan, pearl farmers are also struggling with the problem of
overcrowding. And pollution is a major concern.

NARRATOR: After 100 years of continuous pearl culturing in Ago Bay, the Akoya
oyster is under assault.

NARRATOR: Katsumasa Tanaka and his wife, Kikumi, are second generation pearl
farmers at Shimatown on Ago Bay. One of hundreds of independent producers in
Japan, the Tanikas practice a technique handed down from Katsumasa's father,
who started the family business more than 30 years ago.

KATSUMASA TANAKA: We are an average-sized farm for this area. We usually
cultivate between 30,000 and 50,000 shells. But the mortality rate for our
larger sized shells is very high. We are happy if even half of them survive.
The reason for this are the condition of the sea and the natural factors like
the weather.

NARRATOR: Ago Bay is no longer a quiet backwater. Today, it's a busy port
surrounded by residential and tourist development. Industrial and domestic
wastes are steadily polluting the once healthy waters in which the farmed
oysters live and breathe.

FRED WARD: Oysters require clean water to produce good pearls. They're like the
parakeet in the mine: They're a good barometer for what's going on. So, you
need, as the farmer, to put that oyster basket into good water. And that's
virtually unobtainable in an industrialized country like Japan.

NARRATOR: One threat is when toxin-producing plankton reproduce in great
numbers, causing what is called "red tide." Long term problems with pollution
have made Japanese scientists leading authorities on algal blooms. The senior
manager at Mikimoto's Pearl Research Laboratory is Dr. Shigeru Akamatsu.

SHIGERU AKAMATSU: Red tides are usually caused by agricultural pesticides,
detergents, or conditions which increase nutrients in the water. But with this
type of red tide in Ago Bay, we unfortunately still don't know the cause.

NARRATOR: Every day, the laboratory collects samples to monitor the water
quality in Ago Bay. When dangerously high levels of plankton are detected,
Mikimoto scientists alert government authorities, who advise local farmers to
reposition their oysters.

SHIGERU AKAMATSU: We experimented by forcing plankton into the oyster. Much to
our surprise, when the plankton entered, the oyster tried very hard to expel
the plankton. Within three to five minutes, the movement of its heart became
very abnormal, and the oyster died at once. So, now we know this plankton is
very dangerous.

NARRATOR: But red tide isn't the only problem. Ago Bay is now pushed to the
limits, accommodating scores of small pearling companies.

KATSUMASA TANAKA: All the places you see here are pearl farms. Just in our area
alone, there are over 130 companies. So, overcrowding, too, has become a huge
problem.

NARRATOR: Packed tightly across the bay, the mesh of oyster nets restricts
tidal movements, reducing the food supply. If the oysters don't grow, neither
do the pearls. Rising mortality rates is one reason Japanese pearl farmers have
taken to harvesting early.

NARRATOR: On some farms, the traditional three-year growth cycle has been
reduced to as little as six months. Often, buyers are unwilling to risk the
wait for higher-quality pearls. This harvest will supply the ready market for
less expensive pearl jewelry.

KATSUMASA TANAKA: Several decades ago, in my father's time, almost all the
pearls were a two-year crop, sometimes even three years. If we left these a
year longer, they'd be of better quality. But to leave the oyster one more year
is a costly gamble, because they'll probably die. And that's our dilemma.

NARRATOR: In the still-clean waters of Western Australia, pearl producers have
been able to avoid many of the problems faced by Japanese farmers. But clean
water alone is not enough. During the nucleation process, the large Australian
oyster becomes stressed. An elaborate storage and conveyance system is designed
to reduce the time it spends out of water.

NICHOLAS PASPALEY: The Australian shell is a very difficult animal to deal
with. It's a very delicate creature. It'll stress from being out of the water
too long, it'll stress from being overcrowded with other oysters.

NARRATOR: No longer a secret, Mikimoto's technique is still performed here by
Japanese technicians. A cut is made in the oyster, and a shell bead inserted
into the flesh. Positioning the bead is critical. For a perfect round, the
technicians aim for the reproductive organs.

It's traumatic for the oyster and demanding for the technicians, who perform up
to 500 operations a day. One slip of the scalpel and the oyster could bleed to
death.

NARRATOR: Nick Paspaley and his technicians have developed their own trade
secrets. They've introduced antiseptics and hygienic conditions to minimize the
oyster's exposure to infection.

NICHOLAS PASPALEY: The results were spectacularly different. Mortality rates
dropped to less than one percent, and the pearl shell is much happier.

NARRATOR: Unlike fish, oysters can survive out of water for hours.

But to minimize stress, they're stored in tanks immediately after nucleation,
and then transported to huge underwater farms. Here, they're kept for three
months to recover from the operation.

NICHOLAS PASPALEY: What we try to do is help the shell to be perfect. The
healthier a shell is, the more chance that it has of producing something
without flaws or without problems in its growth cycle.

NARRATOR: Every two weeks, the oysters are cleaned to remove marine growths,
which carry parasites and diseases that can affect the oyster's health, or even
kill them. The cages are turned regularly, so that the embryonic pearls develop
evenly. This way, they're more likely to produce the perfect spheres that are
so highly prized in the marketplace.

NARRATOR: Once they've recovered, the oysters are transferred to one of the
farms dotted in more sheltered waters. The farm at Talbot Bay is nestled among
the ancient cliffs of the Kimberley Coast. It's home to more than 100,000
nucleated oysters. As the oysters mature, they're periodically x-rayed to gauge
their progress. But with all the care in the world, nature still has the power
to intervene. High winds and waves can kill unprotected oysters and tear apart
entire farms.

NICHOLAS PASPALEY: Several years ago, a big cyclone went through, and we had a
whole fleet hiding from 250 kilometer winds. Every minute that you're out there
in the middle of nature, it's sort of overpowering. You can't be there without
feeling its presence.

NARRATOR: After two years of careful nurturing, the oysters are removed from
the water, so that the pearls can be harvested. This is the moment of truth.

NICHOLAS PASPALEY: At the end of the day, the shell is the one that does what
it does and we really don't know what it's going to do, until two years later.
Hence, it's quite exciting when you harvest. If you look at shells in the water
and try to pick out which one of those shells has got the fine pearl, I think
you've got more chance in a casino picking the roulette number.

NARRATOR: Now, in a second operation, the pearl is removed. After a two-year
growth cycle, the hope for a result is a large pearl of excellent quality, with
a thick coating of nacre. If an oyster yields a good-quality pearl, the
technician immediately implants a fresh nucleus to start the process all over
again. With a productive life of around eight years, an oyster can produce up
to four pearls.

NARRATOR: As the oyster continues to grow, it can tolerate increasingly larger
nuclei, so it will produce its biggest pearl towards the end of its life.
Giant South Sea pearls such as this comprise only five percent of the world's
pearl market. They are extravagantly expensive, and out of reach for most
consumers. The smaller Japanese pearl is still the most popular and affordable.
The Mikimoto Company specializes in the high-end of this vast consumer
market.

SHIGERU AKAMATSU: This is a quality triangle. If we take this as an example,
generally, the top quality items from the harvest comprise five percent of the
total. Mikimoto concentrates on this top five percent to make its products.

NARRATOR: For years, the Mikimoto Company produced all the pearls it sold.
Today, half of what it sells comes from other pearl suppliers. China and other
Asian countries are rapidly developing their own pearl culturing industries,
competing for the mass market with Japan's Akoya pearls. Japan's dominance has
diminished as a producer, but Japanese companies still control much of the
world's pearl market. The rest of it is shared by others. Nick Paspaley will
soon be selling his most recent harvest.

NICHOLAS PASPALEY: This is a fabulous crop. This is one of the nicer crops. And
for this particular lot of shells, everything went right from day one, and
nature was kind. And there's some fabulous pieces. But the ultimate objective
is beauty. And beauty can only come from the maker itself.

NARRATOR: In the world of pearls, these command the highest price. And it is
New York where many of them will end up. Americans spend more each year on
pearl jewelry than any other consumers in the world. Much of what they buy
passes through New York.

SAKVADOR ASSAEL: We are, I think, today, in the United States, great fashion
leaders, because on Fifth Avenue, New York, you have Harry Winston, and then we
have people like Van Cleef and Arpel, Tiffany, Cartier, Aspray. I mean, this
type of jeweler, they are all-- Not only are they jewelers, but they create
fashion. In other words, they have created the image for the pearl.

NARRATOR: One of this country's best known pearl dealers is Salvador Assael. He
specializes in South Sea pearls from Tahiti and Australia, that command
dazzling prices in New York's auction rooms and jewelry salons.

SALVADOR ASSAEL: Well, I love pearls beyond anything. I love my family most of
all, I love my office staff most of all, but, after that, I love pearls most of
all. There's a warmth to it that no other gem stone will do to me. A diamond I
have no feeling for. To give you an idea here, here you have it right here,
these are all Australian pearls. They are natural in the sense that-- They are
not natural pearls, they're cultivated, of course, in the sense that the
Australian pearl, just like the black pearl, too, but it's the only pearl, I
would say, that comes out of the water and it is sold in its natural way. In
other words, it is not bleached, it is not colored, it's just drilled, if you
want to make a necklace or halved if you want to put it in an earring. This
necklace, as you see it here, a woman will wear it for 20 years, 30 years, she
can die and give it to her daughter, the daughter can wear it again for 20 or
30 or 40 years, and give it again. This necklace, this strand of pearls, can
last hundreds of years.

KRISTIN JOYCE: What's interesting about pearls as fashion in the 20th century
is probably the range of ages and the types of women who wear them,
particularly in the '20s, with Josephine Baker, for example, who was an erotic
Parisian dancer.

NARRATOR: Her flamboyant costumes included yards of the gem that had once been
the trademark of nobility.

KRISTIN JOYCE: Josephine Baker wore nothing but pearls, encrusted bustiers and
hula skirts with laces of pearls dangling down.

NEWSREEL: At the Folies-Bergère, the rage is Josephine Baker, daughter
of a St. Louis washerwoman. Her loose-limbed abandon epitomizes Paris at
night.

KRISTIN JOYCE: Twenty years later, we suddenly have the girl from the good
family, we have the patrician upper-crust, particularly represented in the
American cinema with women such as Grace Kelly and Audrey Hepburn, who were
wearing gloves and hats and the perfect pearl choker.

STACEY OKUN: I think pearls have always been an extremely popular American
phenomenon. There was a look in the 1950s that every woman in America emulated,
every mother gave her daughter pearls on their graduation day, and these have
been passed down, and we're into two more generations since then. I'm wearing
my grandmother's pearls right now in my ears and on my blazer. It symbolized a
wealth and a glamour that was very important in America. There are a handful of
contemporary jewelry designers who are turning tradition on its ear with
pearls, creating very modern, delicate looks with Biwa and South Sea pearls
that you haven't seen before.

NARRATOR: These cross-shaped pearls are from Lake Biwa in Japan. Formed in
fresh water mussels, the Biwa pearls are induced by inserting mantle tissue
alone without a bead. As a result, it's the shape of the tissue that determines
the shape of the pearl. But as environmental pollution contaminates the lake
where they grow, these gems are now virtually unobtainable.

NARRATOR: Today, it is the black pearl that is capturing the attention of
jewelry designers. Black pearls were once considered an exotic oddity, rare and
almost mythical. Now, they are becoming increasingly popular.

NARRATOR: Salvador Assael claims credit for helping introduce the black pearl
to New York's fashion jewelers. In the past few years, more islands in the
South Pacific have been producing this once-rare commodity. Most black pearls
are produced commercially in the remote coral atolls of Tahiti, in the middle
of the Pacific Ocean.

NARRATOR: The warm ocean currents and concentration of plankton in these waters
create a favorable environment for the black-lipped pearl oysters, pinctada
margaratifara.
. This oyster is second only to the giant pinctada
maxima
in size, growing up to 12 inches in width and weighing as much as 11
pounds. It can produce pearls ranging from 10 to 17 millimeters. The pearl's
distinctive range of colors is determined by the dark shades of the oyster
shell and may also be affected by mineral salts in the water.

SALVADOR ASSAEL: We feel there must be at least 40 different colors of black,
ranging from peacock, which is the top color, down to the fine black, down to a
gun metal gray, to almost very, very light gray.

NARRATOR: Like the Australians, Tahitian pearl producers have adapted the
traditional Japanese methods of cultivation to suit local conditions. But
typhoons and sudden temperature fluctuations make these oysters vulnerable.
Until recently, mortality was high, with a third of oysters dying after
nucleation.

NARRATOR: To ensure the future of pearl culturing, the industry must understand
every aspect of the oyster's development, even manipulating its genes in the
quest for ultimate control. Dr. John Lucas is experimenting with a method of
artificially breeding oysters in hatcheries, so that the small island states of
the South Pacific can develop their own pearling industries without plundering
their reefs for wild oysters. The moment of spawning begins with a milky
eruption.

JOHN LUCAS: Look it, clouds of sperm, millions of sperm in that lock there. And
the typical sperm with little heads and long tails and they swim through the
water. We're going to collect them. And we keep the males like this separate
from the females, and the females release millions of eggs, and then we will
fertilize the eggs with some of these sperm. The real advantage of hatcheries,
however, is that you can select the oysters that have particular
characteristics, and so you can start to have generations of oysters, perhaps
you breed for oysters that have a bigger gap between the shell, so that you can
put bigger beads in to make bigger pearls for the same size.

JOHN LUCAS: You can also select for oysters that have, say, a more silver
luster, if that's what you want, or if they're black pearls, that have a more
blacky green, the really desirable color. So, over a series of generations, you
can achieve this. One of the really long-term futures could be to take the
pearl oyster tissue and culture it in a test tube and then have that secrete
nacre around beads, so that you have cultured pearls produced in a test
tube.

NARRATOR: The Japanese were the first to experiment with artificial breeding
techniques more than 50 years ago. Then, as now, there are not enough wild
Akoya oysters to meet the demands of the industry. Today, they hatch oysters in
large glass tanks inside laboratories. After two months' growth, the spats, or
baby oysters, are suspended under water in breeding cages.

FRED WARD: Those oysters never bounce around on rocks and they never are rough
and tumble in the surf and in the sand. And they just don't seem to ever grow
as large or as healthy as natural oysters. The oysters that I saw in Ago Bay a
few years ago were so weak and small that you could actually press on the side
and they were flexible.

NARRATOR: Overbreeding from the same genetic strains may soften the oysters'
shell. Because the shell is its only defense against the outside world, any
weakness in this natural armor can put the health of the oyster at risk.

SHIGERU AKAMATSU: When the shell is so thin, it's easy for parasites to eat
through it and enter the oyster's body. So, the oyster weakens and dies more
easily. Scientists are now making a lot of effort to catch oysters in the wild.
When we find them, we freeze their sperm. This way we hope to ensure the Akoya
species survives. And the same technology can help to produce a stronger,
healthier oyster for our industry. This is what we are striving for.

NARRATOR: But, even healthy oysters do not always produce perfect pearls.

NICHOLAS PASPALEY: Five or ten percent is all you get in gem quality, five or
ten percent of your crop may be gem quality if it's a good crop. And, of
course, you also have fine quality, then you have good quality, and then you
have the low quality. Actually, you need all of that to satisfy your markets.
If it was all gem quality, you know, perhaps the scarcity factor might
disappear.

NICHOLAS PASPALEY: But, we don't have control over what the shell does with the
pearl itself. It decides what color it's going to produce. It decides whether
it's going to produce fine nacre or coarse nacre, if the rainbow colors are in
the pearl or not. So, we have control over what we do. But, nature and the
shells, they control the rest. And we just hope-- we hope it all works for
us.

NARRATOR: At the end of the annual harvest, every gem is graded by shape,
color, lustre and size. The painstaking process of matching the pearls then
begins.

NICHOLAS PASPALEY: To get the size, the shape and the exact color match, it's
almost impossible. This strand-- This is the third year I've had this strand.
And I'm confident we'll complete it from this year's crop. But, what we do is
we have a first selection in the first year, and try to make it as perfect as
we can in that year. But, then if it's not completed because we just don't have
the pieces that match, then we'll keep it over for the next year. And from that
crop we'll go right through all the crop. This will sell probably for about
$350,000 U.S. dollars when it's completed.

NARRATOR: With only 150 gem quality South Sea necklaces produced in a year,
these cultured pearls have started to command prices at auction once reserved
for rare natural pearls.

NARRATOR: In 1992, an Australian South Sea necklace was sold at Sotheby's in
New York for $2.3 million dollars, a world auction record.

Pearls have once more become icons of wealth and power.

SOTHEBY'S: This is the premier South Sea's necklace which we're offering in
this magnificent jewelry sale. The pearls range from close to 15 millimeters to
over 17 millimeters. As you can see it's a perfect match. Wonderful color and
lustre.

One of the pearls is also incredibly rare, and they become rarer in these large
fine qualities because of environmental problems. So, the unpredictability of
nature effects the value of these pearls as well.

AUCTIONEER: Any advance over $800,000? L268.

NARRATOR: Australia's cultured pearl industry continues to benefit from the
luxury of largely unpolluted waters. Off the country's remote northern coast,
pearl farmers can still collect wild shells, but only with a permit. Strictly
enforced quotas limit the number of shells each farmer can collect, helping to
ensure the future of Australia's wild oyster population.

NICHOLAS PASPALEY: You're talking to a man who has done well out of this
beautiful natural resource. Over the years I've been involved with hatcheries,
with people's ideas of cultivating pearls in great big factories in Japan with
controlled environments and all that sort of-- all those ideas.

NICHOLAS PASPALEY: It's the arrogance of man that makes him think well, I can
create this in a factory. Well, I doubt it, you know. The only reason we have
success with these is because we've got nature creating this for us. We
couldn't do this if we tried. In fact, the only problems that we ever have in
our industry are the problems that we've created.

FRED WARD: It makes you realize how vulnerable it all is once you start looking
at the problem areas. So, you see there are more and more people on earth.
They're polluting the earth more and more. Humans do have a certain amount of
waste associated with their lives. And this is bad for pearling.

A good oil tanker wreck off the coast of any pearling country would probably
wipe out production for some years.

__: Are you still set on my bringing you a pearl from the depths of the Indian
Ocean?

__: Yes, a big pearl, a really big pearl.

NARRATOR: Pearls were once considered miraculous, a gift from the Gods. Science
may have unraveled the oyster's secrets, but the pearl remains an evocative
symbol of nature's genius, and a haunting reminder that humans too often
destroy what they treasure most.

NICHOLAS PASPALEY: There's something unique about pearls that you don't see in
anything else. And they have that mysterious characteristic which is very hard
to describe. It's like the moon, you know. It's almost like these don't come
from our life.

[music]

[Is a mysterious virus threatening Japan's once thriving pearl industry? Find
out the latest thinking on NOVA's web site at www.pbs.org]

To order this show for $19.95, plus shipping and handling, call 1-800-255-9425.
And to learn more about how science can solve the mysteries of our world, ask
about our many other NOVA videos.

Powered by ScribeFire.

Leave a comment

Drupal's page serving mechanism (4.6)

Drupal's page serving mechanism (4.6)

This is a commentary on the process Drupal
goes through when serving a page. For convenience, we will choose the
following URL, which asks Drupal to display the first node for us. (A
node is a thing, usually a web page.)

http://127.0.0.1/~vandyk/drupal/?q=node/1

A visual companion to this narration can be found here;
you may want to print it out and follow along. Before we start, let's
dissect the URL. I'm running on an OS X machine, so the site I'm
serving lives at /Users/vandyk/Sites/. The drupal directory contains a
checkout of the latest Drupal CVS tree. It looks like this:

CHANGELOG.txt
cron.php
CVS/
database/
favicon.ico
includes/
index.php
INSTALL.txt
LICENSE.txt
MAINTAINERS.txt
misc/
modules/
phpinfo.php
scripts/
themes/
tiptoe.txt
update.php
xmlrpc.php

So the URL above will be be requesting the root directory / of the Drupal site. Apache translates that into index.php. One variable/value pair is passed along with the request: the variable 'q' is set to the value 'node/1'.

So, let's pick up the show with the execution of index.php, which looks very simple and is only a few lines long.

Let's take a broad look at what happens during the execution of index.php. First, the includes/bootstrap.inc file is included, bringing in all the functions that are necessary to get Drupal's machinery up and running. There's a call to drupal_page_header(), which starts a timer, sets up caching, and notifies interested modules that the request is beginning. Next, the includes/common.inc
file is included, giving access to a wide variety of utility functions
such as path formatting functions, form generation and validation, etc.
The call to fix_gpc_magic() is there to check on the
status of PHP "magic quotes" and to ensure that all escaped quotes
enter Drupal's database consistently. Drupal then builds its navigation
menu and sets the variable $status to the result of that
operation. In the switch statement, Drupal checks for cases in which a
Not Found or Access Denied message needs to be generated, and finally a
call to drupal_page_footer(), which notifies all interested modules that the request is ending. Drupal closes up shop and the page is served. Simple, eh?

Let's delve a little more deeply into the process outlined above.

The first line of index.php includes the includes/bootstrap.inc file, but it also executes code towards the end of bootstrap.inc. First, it destroys any previous variable named $conf. Next, it calls conf_init().
This function allows Drupal to use site-specific configuration files,
if it finds them. The name of the site-specific configuration file is
based on the hostname of the server, as reported by PHP. conf_init returns the name of the site-specific configuration file; if no site-specific configuration file is found, sets the variable $config equal to the string $confdir/default. Next, it includes the named configuration file. Thus, in the default case it will include sites/default/settings.php. The code in conf_init() would be easier to understand if the variable $file were instead called $potential_filename. Likewise $conf_filename would be a better choice than $config.

The selected configuration file (normally /sites/default/settings.php) is now parsed, setting the $db_url variable, the optional $db_prefix variable, the $base_url for the website, and the $languages array (default is "en"=>"english").

The database.inc file is now parsed, with the primary goal of initializing a connection to the database. If MySQL is being used, the database.mysql.inc files is brought in. Although the global variables $db_prefix, $db_type, and $db_url are set, the most useful result of parsing database.inc is a global variable called $active_db which contains the database connection handle.

Now that the database connection is set up, it's time to start a session by including the includes/session.inc
file. Oddly, in this include file the executable code is located at the
top of the file instead of the bottom. What the code does is to tell
PHP to use Drupal's own session storage functions (located in this
file) instead of the default PHP session code. A call to PHP's session_start() function thus calls Drupal's sess_open() and sess_read() functions. The sess_read() function creates a global $user object and sets the $user->roles array appropriately. Since I am running as an anonymous user, the $user->roles array contains one entry, 1->"anonymous user".

We have a database connection, a session has been set up...now it's time to get things set up for modules. The includes/module.inc file is included but no actual code is executed.

The last thing bootstrap.inc does is to set up the global variable $conf, an array of configuration options. It does this by calling the variable_init() function. If a per-site configuration file exists and has already populated the $conf variable, this populated array is passed in to variable_init(). Otherwise, the $conf
variable is null and an empty array is passed in. In both cases, a
populated array of name-value pairs is returned and assigned to the
global $conf variable, where it will live for the
duration of this request. It should be noted that name-value pairs in
the per-site configuration file have precedence over name-value pairs
retrieved from the "variable" table by variable_init().

We're done with bootstrap.inc! Now it's time to go back to index.php and call drupal_page_header(). This function has two responsibilities. First, it starts a timer if $conf['dev_timer']
is set; that is, if you are keeping track of page execution times.
Second, if caching has been enabled it retrieves the cached page, calls
module_invoke_all() for the 'init' and 'exit' hooks, and
exits. If caching is not enabled or the page is not being served to an
anonymous user (or several other special cases, like when feedback
needs to be sent to a user), it simply exits and returns control to index.php.

Back at index.php, we find an include statement for common.inc.
This file is chock-full of miscellaneous utility goodness, all kept in
one file for performance reasons. But in addition to putting all these
utility functions into our namespace, common.inc includes some files on its own. They include theme.inc, for theme support; pager.inc for paging through large datasets (it has nothing to do with calling your pager); and menu.inc. In menu.inc, many constants are defined that are used later by the menu system.

The next inclusion that common.inc makes is xmlrpc.inc,
with all sorts of functions for dealing with XML-RPC calls. Although
one would expect a quick check of whether or not this request is
actually an XML-RPC call, no such check is done here. Instead, over 30
variable assignments are made, apparently so that if this request turns
to actually be an XML-RPC call, they will be ready. An xmlrpc_init() function instead may help performance here?

A small tablesort.inc file is included as well,
containing functions that help behind the scenes with sortable tables.
Given the paucity of code here, a performance boost could be gained by
moving these into common.inc itself.

The last include done by common.inc is file.inc, which contains common file handling functions. The constants FILE_DOWNLOADS_PUBLIC = 1 and FILE_DOWNLOADS_PRIVATE = 2 are set here, as well as the FILE_SEPARATOR, which is \\ for Windows machines and / for all others.

Finally, with includes finished, common.inc sets PHP's error handler to the error_handler() function in the common.inc file. This error handler creates a watchdog entry to record the error and, if any error reporting is enabled via the error_reporting directive in PHP's configuration file (php.ini), it prints the error message to the screen. Drupal's error_handler() does not use the last parameter $variables, which is an array that points to the active symbol table at the point the error occurred. The comment "// set error handler:" at the end of common.inc is redundant, as it is readily apparent what the function call to set_error_handler() does.

The Content-Type header is now sent to the browser as a hard coded string: "Content-Type: text/html; charset=utf-8".

If you remember that the URL we are serving ends with /~vandyk/drupal/?q=node/1, you'll note that the variable q has been set. Drupal now parses this out and checks for any path aliasing for the value of q. If the value of q is a path alias, Drupal replaces the value of q with the actual path that the value of q is aliased to. This sleight-of-hand happens before any modules see the value of q. Cool.

Module initialization now happens via the module_init() function. This function runs require_once() on the admin, filter, system, user and watchdog modules. The filter module defines FILTER_HTML* and FILTER_STYLE* constants while being included. Next, other modules are include_once'd via module_list().
In order to be loaded, a module must (1) be enabled (that is, the
status column of the "system" database table must be set to 1), and (2)
Drupal's throttle mechanism must determine whether or not the module is
eligible for exclusion when load is high. First, it determines whether
the module is eligible by looking at the throttle column of the
"system" database table; then, if the module is eligible, it looks at $conf["throttle_level"] to see whether the load is high enough to exclude the module. Once all modules have been include_once'd and their names added to the $list local array, the array is sorted by module name and returned. The returned $list is discarded because the module_list() invocation is not part of an assignment (e.g., it is simply module_list() and not $module_list = module_list()). The strategy here is to keep the module list inside a static variable called $list inside the module_list() function. The next time module_list() is called, it will simply return its static variable $list rather than rebuilding the whole array. We see that as we follow the final objective of module_init(); that is, to send all modules the "init" callback.

To see how the callbacks work let's step through the init callback for the first module. First module_invoke_all()
is called and passed the string enumerating which callback is to be
called. This string could be anything; it is simply a symbol that call
modules have agreed to abide by, by convention. In this case it is the
string "init".

The module_invoke_all() function now steps through the list of modules it got from calling module_list(). The first one is "admin", so it calls module_invoke("admin","init"). The module_invoke()
function simply puts the two together to get the name of the function
it will call. In this case the name of the function to call is "admin_init()". If a function by this name exists, the function is called and the returned result, if any, ends up in an array called $return
which is returned after all modules have been invoked. The lesson
learned here is that if you are writing a module and intend to return a
value from a callback, you must return it as an array. [Jonathan
Chaffer: Each "hook" (our word for what you call a callback) defines its own return type. See the full list of hooks available to module developers, with documentation about what they are expected to return.]

Back to common.inc. There is a check for suspicious input data. To find out whether or not the user has permission to bypass this check, user_access() is called. This retrieves the user's permissions and stashes them in a static variable called $perm.
Whether or not a user has permission for a given action is determined
by a simple substring search for the name of the permission (e.g.,
"bypass input data check") within the $perm string. Our $perm string, as an anonymous user, is currently "0access content, ". Why the 0 at the beginning of the string? Because $perm is initialized to 0 by user_access().

The actual check for suspicious input data is carried out by valid_input_data() which lives in common.inc. It simply goes through an array it's been handed (in this case the $_REQUEST
array) and checks all keys and values for the following "evil" strings:
javascript, expression, alert, dynsrc, datasrc, data, lowsrc, applet,
script, object, style, embed, form, blink, meta, html, frame, iframe,
layer, ilayer, head, frameset, xml. If any of these are matched
watchdog records a warning and Drupal dies (in the PHP sense). I
wondered why both the keys and values of the $_REQUEST array are examined. This seems very time-consuming. Also, would it die if my URL ended with "/?xml=true" or "/?format=xml"?

The next step in common.inc's executable code is a call to locale_init()
to set up locale data. If the user is not an anonymous user and has a
language preference set up, the two-character language key is returned;
otherwise, the key of the single-entry global array $language is returned. In our case, that's "en".

The last gasp of common.inc is to call init_theme(). You'd think that for consistency this would be called theme_init()
(of course, that would be a namespace clash with a callback of the same
name). This finds out which themes are available, which the user has
selected, and then include_once's the chosen theme. If the user's selected theme is not available, the value at $conf["theme_default"] is used. In our case, we are an anonymous user with no theme selected, so the default xtemplate theme is used. Thus, the file themes/xtemplate/xtemplate.theme is include_once'd. The inclusion of xtemplate.theme calls include_once("themes/xtemplate/xtemplate.inc"), and creates a new object called xtemplate as a global variable. Inside this object is an xtemplate object called "template" with lots of attributes. Then there is a nonfunctional line where SetNullBlock is called. A comment indicates that someone is aware that this doesn't work.

Now we're back to index.php! A call to fix_gpc_magic()
is in order. The "gpc" stands for Get, Post, Cookie: the three places
that unescaped quotes may be found. If deemed necessary by the status
of the boolean magic_quotes_gpc directive in PHP's configuration file (php.ini), slashes will be stripped from $_GET, $_POST, $_COOKIE, and $_REQUEST arrays. It seems odd that the function is not called fix_gpc_magic_quotes, since it is the "magic quotes" that are being fixed, not the magic. In my distribution of PHP, the magic_quotes_gpc directive is set to "Off", so slashes do not need to be stripped.

The next step is to set up menus. This step is crucial. The menu
system doesn't just handle displaying menus to the user, but also
determines what function will be handed the responsibility of
displaying the page. The "q" variable (we usually call the
Drupal path) is matched against the available menu items to find the
appropriate callback to use. Much more information on this topic is
available in the menu system documentation for developers. We jump to menu_execute_active_handler() in menu.inc. This sets up a $_menu
array consisting of items, local tasks, path index, and visible arrays.
Then the system realizes that we're not going to be building any menus
for an anonymous user and bows out. The real meat of the node creation
and formatting happens here, but is complex enough for a separate
commentary; Drupal's node building mechanism. Back in index.php, the switch statement doesn't match either case and we approach the last call in the file, to drupal_page_footer in common.inc. This takes care of caching the page we've built if caching is enabled (it's not) and calls module_invoke_all() with the "exit" callback symbol.

Although you may think we're done, PHP's session handler still needs to tidy up. It calls sess_write() in session.inc to update the session database table, then sess_close() which simply returns 1.

We're done.

Powered by ScribeFire.

Leave a comment

常用塑料英文缩写

英文简称 英文全称 中文全称

常用塑料的种类有:
①聚氯乙烯(PVC)
  它是建筑中用量最大的一种塑料。硬质聚氯乙烯的密度为1.38~1.43g/cm3,机械强度高,化学稳定性好,使用温度范围一般在-15~+55℃之间,适宜制造塑料门窗、下水管、线槽等。
②聚乙烯(PE)
  聚乙烯塑料在建筑上主要用于给排水管、卫生洁具。
③聚丙烯(PP)
  聚丙烯的密度在所有塑料中是最小的,约为0.90左右。 聚丙烯常用来生产管材、卫生洁具等建筑制品。
④聚苯乙烯(PS)
  聚苯乙烯为无色透明类似玻璃的塑料。 聚苯乙烯在建筑中主要用来生产泡沫隔热材料、透光材料等制品。
⑤ABS塑料
  ABS塑料是改性聚苯乙烯塑料,以丙烯睛(A)、丁二烯(B)及苯乙烯(S) 为基础的三组分所组成。ABS塑料可制作压有花纹图案的塑料装饰板等。

ABS Acrylonitrile-butadiene-styrene 丙烯腈/丁二烯/苯乙烯共聚物

AES Acrylonitrile-ethylene-styrene 丙烯腈/乙烯/苯乙烯共聚物

AS Acrylonitrile-styrene resin 丙烯腈/苯乙烯共聚物

ASA Acrylonitrile-styrene-acrylate 丙烯腈/苯乙烯/丙烯酸酯共聚物

CA Cellulose acetate 醋酸纤维塑料

CE "Cellulose plastics, general" 通用纤维素塑料

CF Cresol-formaldehyde 甲酚-甲醛树脂

CMC Carboxymethyl cellulose 羧甲基纤维素

CN Cellulose nitrate 硝人比黄花瘦酸纤维素

CPE Chlorinated polyethylene 氯化聚乙烯

CPVC Chlorinated poly(vinyl chloride) 氯化聚氯乙烯

EP "Epoxy, epoxide" 环氧树脂

EPM Ethylene-propylene polymer 乙烯/丙烯共聚物

EPS Expanded polystyrene 可发性聚苯乙烯

EVA Ethylene/vinyl acetate 乙烯/醋酸乙烯共聚物

HDPE High-density polyethylene plastics 高密度聚乙烯

HIPS High impact polystyrene 高抗冲聚苯乙烯

IPS Impact-resistant polystyre ne 耐冲击聚苯乙烯

K树脂 Styrene- butadiene 苯乙烯/丁二烯共聚物

LCP Liquid crystal polymer 液晶聚合物

LDPE Low-density polyethylene plastics 低密度聚乙烯

LLDPE Linear low-density polyethylene 线型低密聚乙烯

LMDPE Linear medium-density polyethylene 线型中密聚乙烯

MBS Methacrylate-butadiene-styrene 甲基丙烯酸/丁二烯/苯乙烯共聚物

MC Methyl cellulose 甲基纤维素

MDPE Medium-density polyethylene 中密聚乙烯

MF Melamine-formaldehyde resin 密胺-甲醛树脂

MPF Melamine/phenol-formaldehyde 密胺/酚醛树脂

PA Polyamide (nylon) 聚酰胺(尼龙)

PAE Polyarylether 聚芳醚

PAEK Polyaryletherketone 聚芳醚酮

PAI Polyamide-imide 聚酰胺-酰亚胺

PAK Polyester alkyd 聚酯树脂

PAN Polyacrylonitrile 聚丙烯腈

PASU Polyarylsulfone 聚芳砜

PAT Polyarylate 聚芳酯

PAUR Poly(ester urethane) 聚酯型聚氨酯

PB Polybutene-1 聚丁烯-[1]

PBT Poly(butylene terephthalate) 聚对苯二酸丁二酯

PC Polycarbonate 聚碳酸酯

PE Polyethylene 聚乙烯

PEEK Polyetheretherketone 聚醚醚酮

PEI Poly(etherimide) 聚醚酰亚胺

PEK Polyether ketone 聚醚酮

PES Poly(ether sulfone) 聚醚砜

PET Poly(ethylene terephthalate) 聚对苯二甲酸乙二酯

PEUR Poly(ether urethane) 聚醚型聚氨酯

PF Phenol-formaldehyde resin 酚醛树脂

PI Polyimide 聚酰亚胺

PMMA Poly(methyl methacrylate) 聚甲基丙烯酸甲酯

PMS Poly(alpha-methylstyrene) 聚α- ** 乙烯

POM "Polyoxymethylene, polyacetal" 聚甲醛

PP Polypropylene 聚丙烯

PPO Poly(phenylene oxide) deprecated 聚苯醚

PP-R Polypropylene randon coplymer 无规共聚聚丙烯

PPS Poly(phenylene sulfide) 聚苯硫醚

PPSU Poly(phenylene sulfone) 聚苯砜

PS Polystyrene 聚苯乙烯

PSU Polysulfone 聚砜

PTFE Polytetrafluoroethylene 聚四氟乙烯

PU(或PUR)Polyurethane 聚氨酯

PVAL Poly(vinyl alcohol) 聚乙烯醇

PVC Poly(vinyl chloride) 聚氯乙烯

PVCC chlorinated poly(vinyl chloride)(*CPVC) 氯化聚氯乙烯

RP reinforced plastics 增强塑料

RTP reinforced thermoplastics 增强热塑性塑料

S/AN styrene-acryonitrile copolymer 苯乙烯/丙烯腈共聚物

SBS styrene-butadiene block copolymer 苯乙烯/丁二烯嵌段共聚物

SMC sheet molding compound 片状模塑料

S/MS styrene-α-methylstyrene copolymer 苯乙烯/α- ** 乙烯共聚物

TMC thick molding compound 厚片模塑料

TPE thermoplastic elastomer 热塑性弹性体

TPU thermoplastic urethanes 热塑性聚氨酯

PVDC Poly(vinylidene chloride) 聚(偏二氯乙烯)

PVDF Poly(vinylidene fluoride) 聚(偏二氟乙烯)

SAN Styrene-acrylonitrile plastic 苯乙烯/丙烯腈共聚物

SB Styrene-butadiene plastic 苯乙烯/丁二烯共聚物

Si Silicone plastics 有机硅塑料

SMS Styrene/alpha-methylstyrene plastic 苯乙烯/α- ** 乙烯共聚物

TPE Thermoplastic elastomer 热塑性弹性体

UF Urea-formaldehyde resin 脲甲醛树脂

UHMWPE Ultra-high molecular weight PE 超高分子量聚乙烯

UP Unsaturated polyester 不饱和聚酯

常用塑料的缩写代号、英文全称、中文全称及别名对照表

缩写代号 英文全称 中文全称 别名

ABS Acrylonitrile-butadiene-styrene 丙烯腈/丁二烯/苯乙烯共聚物 ABS树脂

AES Acrylonitrile-ethylene-styrene 丙烯腈/乙烯/苯乙烯共聚物 AES树脂

AS Acrylonitrile-styrene resin 丙烯腈/苯乙烯共聚物 AS树脂

CN Cellulose nitrate 硝人比黄花瘦酸纤维素 赛璐璐

EPM Ethylene-propylene polymer 乙烯/丙烯共聚物 乙丙树脂

EPS Expanded polystyrene 可发性聚苯乙烯 发泡聚苯乙烯

EVA Ethylene/vinyl acetate 乙烯/醋酸乙烯共聚物 EVA树脂

GPPS Generral polystyrene 通用聚苯乙烯 透明聚苯乙烯

HDPE High-density polyethylene plastics 高密度聚乙烯 低压聚乙烯

HIPS High impact polystyrene 高抗冲聚苯乙烯 改性聚苯乙烯

K树脂 Styrene- butadiene 苯乙烯/丁二烯共聚物 K胶

LCP Liquid crystal polymer 液晶聚合物

LDPE Low-density polyethylene plastics 低密度聚乙烯 高压聚乙烯

LLDPE Linear low-density polyethylene 线型低密聚乙烯 线型高压聚乙烯

MF Melamine-formaldehyde resin 密胺-甲醛树脂 密胺塑料

PA Polyamide (nylon) 聚酰胺 尼龙、锦纶

PAI Polyamide-imide 聚酰胺-酰亚胺

PBT Poly(butylene terephthalate) 聚对苯二酸丁二酯 聚酯

PC Polycarbonate 聚碳酸酯

PE Polyethylene 聚乙烯

PEI Poly(etherimide) 聚醚酰亚胺

PES Poly(ether sulfone) 聚醚砜 聚苯醚砜

PET Poly(ethylene terephthalate) 聚对苯二甲酸乙二酯 涤纶(线型)树脂

PF Phenol-formaldehyde resin 酚醛树脂 电木粉、胶木粉

PI Polyimide 聚酰亚胺

PMMA Poly(methyl methacrylate) 聚甲基丙烯酸甲酯 有机玻璃

POM "Polyoxymethylene, polyacetal" 聚甲醛

PP Polypropylene 聚丙烯

PP-R Polypropylene randon coplymer 无规共聚聚丙烯

PPO Poly(phenylene oxide) deprecated 聚苯醚 聚苯撑氧

PPS Poly(phenylene sulfide) 聚苯硫醚 聚次苯基硫醚

PS Polystyrene 聚苯乙烯

PSU Polysulfone 聚砜

PTFE(F4)Polytetrafluoroethylene 聚四氟乙烯 四氟、塑料王

PUR Polyurethane 聚氨酯 聚氨基甲酸酯

PU Polyurethane 聚氨酯 聚氨基甲酸乙酯

PVC Poly(vinyl chloride) 聚氯乙烯

SAN Styrene-acrylonitrile plastic 苯乙烯/丙烯腈共聚物 SAN树脂

TPE Thermoplastic elastomer 热塑性弹性体

UF Urea-formaldehyde resin 脲甲醛树脂 电玉粉

UHMWPE Ultra-high molecular weight PE 超高分子量聚乙烯

Powered by ScribeFire.

Leave a comment

WP-Stats 2.11 Readme

Usage Instructions

General Usage
  1. Go to 'WP-Admin -> Write -> Write Page'
  2. Type any title you like in the post's title area
  3. Type '[page_stats]' in the post's content area (without the quotes)
  4. Type 'stats' in the post's slug area (without the quotes)
  5. Click 'Publish'
  6. If you ARE NOT using nice permalinks, you need to go to 'WP-Admin -> Options -> Stats' and under 'Stats URL', you need to fill in the URL to the Stats Page you created above.
Using Stats Widget
  1. Activate WP-Stats Widget Plugin
  2. Go to 'WP-Admin -> Presentation -> Widgets'
  3. Drag the Stats Widget to your sidebar
  4. You can configure the Stats Widget by clicking on the configure icon
  5. Click 'Save changes'
Leave a comment

关于PageRank的几个基本概念

关于PageRank的几个基本概念
 
 

1 - 所谓PageRank,是 Google 对某个网页的重要性评估的评估值,是 Page Rank,而不是 "Site Rank",不是对整个网站的评估值。

如果你的首页的 PageRank 是5,那只是说首页那个页面的 PageRank 是5,而不是说你的整个网站。Google 的 PageRank 不针对网站而言,只针对页面,一个个的页面。

2 - 某个页面的 PageRank 值,主要来自于指向这个页面的所有链接所代表的那些页面。所谓“所有链接”包括两部分:本网站之外的外部链接和本网站内的其他页面的内部链接。

也就是说,任何一个页面的 PageRank 值,是由外部链接和内部链接共同作用而产生的。而不只是由外部链接或只由内部链接单方面作用而产
生。Jesse 说他的首页因为有两个PR5的网站指过来,所以首页就有了PR5,其实还有更多的内部链接指向首页,加上外部的两个PR5的页面一起才使
他的首页有PR5。

3 - PageRank 值具有传递性。这一点说起来相对比较复杂些。

a. 一个拥有一定PR值的页面指向你的某个页面时,你的某个页面就会分享到那个页面PR值的一部分。

b. 并不完全是较高PR值的页面比PR值教低的页面就更好。比方说,一个PR6的页面和一个PR5的页面,如果那个R6的页面上有200个链接
指向其他页面,而那个PR5的页面只有几十个比方说50个链接,那可能这个PR5的页面传递到你网站的PR值就要比那个PR6的页面多。一个页面上的链接
越少,被连接的页面就能分享到更多的PR值,反之,链接越多,每个链接能分享的就越少。

这就是为什么我们在英文网站和人交换链接时经常看到这样的条件的原因:如果你的链接页面有超过50个链接,免谈。

所以我们在做 "Directory" 和 "Links" 页面时都会分成若干个页面,比如 "Links1", "Links2", "Links3"等等,或者也有人把链接页面通过分类而作成了若干页面。不会把所有交换来的链接统统放到一起。

c. 只有静态链接才能传递PR值。由动态页面或程序产生的链接不会传递PR值。象 cgi, java, Flash 等程序产生的链接就不会传递PR值,但可能带来流量。看你要什么而已,是PR还是流量?

d. 在第二点中谈到某页面的PR值来自于外部和内部链接。在这一小点中再延续来谈。

首页也好,还是首页下的其他页面也好,在 PageRank 看来都一样,都是 page,那么给予PR值的算法也是一样,是这样给首页的,也就这样给站内的任何一个其他页面。

如果你的网站中的某一个页面获得了来自其他网站的外部链接,因而拥有了一定的PR值,而这个页面上又有链接指向你的首页,那么你的首页就可以分享
一部分来自这个页面的PR值。如果这个页面的PR值越高,这样的页面越多,那么你的首页就会分享到越高的PR值。也可以这样来看:

如果你的首页没有一个外部链接,你的首页同样可以获得一定的PR值,那来自内部链接。当然这不现实,你不会只让其他页面获得链接而不给首页,只
是说这个道理而已。换个角度来看:太多的网站(可能就包括你的)上首页之外的其他页面也有不错的PR值,但这些页面并没有任何站外的链接指向它,那这些页
面的PR值从哪里来的?显然从本网站的内部获得。那么这个页面可以从站内获得PR值,首页为什么不可以?PageRank 是Page Rank,不是
 Homepage Rank。

作为页面来看,首页和其他页面都一样,没有区别。首页可以传递PR值给站内其他页面,那站内的其他页面也可以传递PR值给首页。双向的,交互的。

4 - 关于来自不相关内容的网站的链接。

有人不愿意和内容不同的网站连接,认为和这些网站连接不能得到PR。什么说法都有。我觉得卖药的网站尽管去连IT的网站就是了,只要不是 Link farm,至少目前是这样。Google 也许希望互连的站点是同类的,但 Google目前好象还没这么做。

你可以这样来思考:怎么样才是同类?怎么样又不是同类了?你可以认为卖药的和IT不是同类,那卖电脑的和卖药的是不是同类?新闻站点与IT站点和购物站点怎么办?卖拖鞋的和卖皮鞋的又怎么办?卖T恤的不能和网站设计的连接?

无非是类别划分的标准而已。这个标准到底要多大或多小才是同类?同一个集合里是同类,可把这个集合缩小一圈就变得不是同类了;本来看起来不是同类的,可把集合扩大一圈或几圈又变得是同类了。不是吗?

博客作者的兴趣广泛因而博客内的内容很多,而这些内容又都似乎不相干,那怎么和别的博客连?还是多内容的和多内容的连,单一内容的和单一的连?CNN是个新闻站点,该不该只和新闻站点连接?

相关知识
Google:质量指南概述
企业网站设计优化技巧
Google的PageRank™ 技术
关于PageRank的几个基本概念
Google的PageRank算法
Google的搜索结果排列算法
中国网站PR值最高的网站
PageRank是供优化还是供娱乐
Google的搜索结果排列算法
为什么要选用Google搜索
Leave a comment

十年金羽辩

 

    http://www.sports.cn/ 2007-06-12 12:03:00 《体育画报》     

   

   是重于金,还是轻于羽;是过分张扬,还是本性率真;是功德圆满,还是李广难封……一个70后的矛盾范本,一条归为坚韧的活路。

 

    十年时间,足以令人忘却许多事。比如,李金羽已经记不清1997913的早上,自己吃的是馄饨还是饺子。十年时间,有些事情却想忘也忘不掉。比如,李金羽还记得,那个金州的夜晚,空气真的很凉。世界杯预选赛亚洲区十强赛首战,24,中国队被波斯铁骑冲散。李金羽替补出场,没有进球。赛后接受采访时,中国队主教练戚务生脸色铁青:“有些球员,上场后没有达到教练的要求。”此时的李金羽还没意识到,这句话决定了他在此次十强赛中的命运。

 

球队随即召开队内总结会,这时,李金羽感觉到了异常,气氛不对。压抑得透不过气来的会场,发言者或明或暗的言语,都向他扑来。“当时我的感觉就是特别晕,整个人都懵了,”李金羽回忆道,“他们都赖我,说因为我上场,马达维基亚才进了两个球。”

 

“怎么回事?我哪里做错了?”李金羽在心里一遍遍地拷问自己。首次参加如此重大的赛事,年仅20的他,面对如此尖锐的问责,有些慌乱。稍稍冷静后,他发现了一个重大的漏洞:马达维基亚进第二个球时,自己还没上场! 天大的冤屈!

 

令人无法想象的是,李金羽选择了沉默。或许,这是他的抗争。又或许,这是他的无奈。但对当时的李金羽而言,沉默和呐喊都无力改变结局。无论如何,他被抛弃了。直至十强赛最后一场,已经失去出线机会的中国队主场对科威特队,李金羽才再次得到出场机会。

 

自此,争议就像难缠的蚊虫,围着李金羽转悠了整整十年。

 

他是个天才,他是个庸才;他很有个性,他过分张扬;他很有创意,他华而不实;他在俱乐部是龙,在国家队是虫。等等等等。

 

“够了!我是在被误解中长大的。”524,位于济南市中心的一家仙踪林里,灯光

温暖,音乐舒缓,行将而立的李金羽用尽量平和的语调,向《SI体育画报》记者传达他那积

攒了十年的愤怒。于是,我们的谈话,从争议开始,也注定无法在平静中结束。

 

• • • •

 

就像一个人走在路上,别人不停地辱骂你,冲你扔石头,指责你。开始,你可能也会回骂,会拣起石头扔回去。然后,你收获了更多的骂声和更大的石头。最后,你开始忘记额头的大包和耳边的嘈杂,埋头前行。因为,你逐渐明白一个道理:你需要在意的是前行的方向,而不是路边的乌鸦。

 

这是李金羽对成熟的理解。有一点哲理,也难掩那一股子怨气。

 

让我们设想这样一群人:直接从青年队进入国家队,在队里帮老队员拎鞋,管谁都叫哥,仍然被强按上“巴西帮”的称呼;承载着一个大国的足球梦想,看到胸前的国旗就浑身颤栗,进球后恣意挥洒青春,却仍被打上“张扬”的烙印。身处如此氛围,李金羽的哲理和怨气就不难令人理解了。

 

李金羽说,其实,我没那么骄傲。

 

1996年 底,留学巴西的健力宝青年队学成回国,李金羽和李铁、隋东亮、张效瑞一起入选国家队。当时,国家队刚刚窝囊地铩羽亚洲杯,如同每一次失败后的换血思维,国 人又一次把希望寄托在这几个“镀金”归来的小青年身上。“压力太大了。”很快,李金羽发现,入选国家队的荣誉感和使命感被压力所取代,踢球的快乐被打了折 扣。

 

那些身经百战的老大哥的态度更让李金羽感到困惑。“我那时对他们特别尊重,会帮他们做这个做那个,我很清楚自己的辈分。几个老队员,像高峰、姜峰他们,没把我们当外人。但并不是每个人都欣赏你。很多人还是会戴着有色眼镜看我们,叫我们‘巴西帮’。”19岁,李金羽即被扣上帽子,尽管当时他还只是个对足球充满疑惑,不知道明天会发生什么的毛头小孩。

 

重压之下,李金羽踉跄起步了。1997年 世界杯外围赛小组赛,中国队主场迎战土库曼斯坦,李金羽接马明宇的传球头球破门。赛后面对媒体,李金羽特意感谢马明宇。人们说,这孩子懂事了。“从小,我 爸妈和教练,都教育我,需要有一颗感恩的心。我也特别尊重为球队作出贡献的人。”李金羽为当时的言行注解。但他也承认,因为在国家队没什么野心,所以有时 就想什么就说什么,也因此得罪了一些人,“有时候,我也挺招人烦的。”

 

没 有野心,并不意味着李金羽漠视身披国字号战袍这一份荣耀。在李金羽的国家队队友李霄鹏眼里,李金羽对国家队这一集体充满了感情。“有一次去西班牙比赛,队 里让他保管一部分美金,大羽很看重,感觉那是组织上对他的信任,于是就把那些美金贴身放好,还会时不时看看这钱还在否。最后发现,队里的钱保管得挺好,但 自己的3000美金丢了。”

 

1999年,被视为黄金一代的中国国奥队挥师汉城,征战奥运会预选赛。肇俊哲的抽射中柱、张玉宁单刀被扑以及李金羽与李玮峰的接力进球被判越位,中国队01负韩国队,中国足球又下了一场辛酸的雨。“当时我们没有必胜的把握,输了,并没感觉如何痛苦。”李金羽轻描淡写地回忆。但当时在汉城采访的记者宋青云提供了不同的证词。比赛当晚,在中国队所住的酒店大堂,宋青云看到李金羽和一个特意前来助威的女性朋友抱头痛哭。

 

2001年世界杯预选赛亚洲十强赛,李金羽被米卢拒绝。“那个时候感觉国家队不要我了,比赛跟我也没啥关系了。挺失落的。”于是,有着强烈被抛弃感的李金羽刻意回避了有关国家队的信息。

 

2004年世界杯预选赛小组赛,中国队在广州70战胜中国香港队,但因净球胜比科威特队少一个而没能小组出线。比赛当晚,郝海东、李霄鹏、李金羽一批人出去吃东西,说到没能出线,郝海东开始掉泪,而李金羽干脆像个孩子一样痛哭流涕。

 

在李金羽看来,1997年那一支国家队的实力史上最强,十强赛不是没打好,而是“我们没敢去创造历史”,1999年奥运会预选赛则是因为“个别位置有缺陷”。2001年,米卢率领中国队闯进世界杯,但李金羽只是个孤寂的看客,对于那支国家队,他甚至不愿意提起。

 

就这样, 除了1 9 9 8 年亚运会的昙花一现,李金羽在国字号球队始终无法坚挺,“庸才”、“鸡肋”这样的称呼开始出现。然而令人费解的是,在俱乐部,李金羽的表演堪称疯狂。

 

1999年,李金羽从法莫道不消魂国南锡回到辽宁队,9场比赛进8球,他和张玉宁、曲圣卿组成的“三叉戟”震惊中国足坛。2002年,李金羽攻入16球,成为当年的甲A联赛最佳射手。2006年,李金羽以26个进球再夺最佳射手。200755,李金羽攻入其在中国顶级联赛的第97球,超越“妖刀”郝海东成为中国足球顶级联赛历史上的最佳射手。就这样,每当人们快要遗忘他之际,李金羽总能用一个傲人的纪录提醒人们他的存在。

 

尽管李金羽强调自己的职业生涯一直处于一个平稳的上升趋势,但一条以其国家队、俱乐部的表现为基点的波浪型曲线却实实在在存在着。为什么?一个大大的问号浮现在每个关注李金羽的人的头脑里。

 

前 健力宝青年队主教练、现国家队主教练朱广沪从技术角度阐述了他的看法。他认为,李金羽在与国家级高水平球队对抗时,速度慢、对抗能力差的弱点暴露得比较明 显,所以踢得不好。来自韩国的教练李章洙则表示,李金羽特点不够鲜明,如果让他选择李金羽和张玉宁两个球员,他会考虑后者。

 

但在李金羽的儿时好友肇俊哲看来,李金羽没在国家队得到足够的支持,原因是“在国家队,每人想法不太一样”。李金羽的父亲李贵军的表达则更直接:“国家队的很多人,都是为了自己表现,不该射的乱射。”而李金羽的启蒙教练张引则在支持二人观点的基础上,提出“让李金羽打前腰”,理由是“李金羽的特点就是善于用脑,隐蔽在强力前锋身后,更能发挥他的长处”⋯⋯

 

    李霄鹏说,大家对李金羽的期望太高了。也许。中国足球有着一部不堪回望的血泪史,中国足球人在这样一个满目疮痍的足球环境中,太渴望救世主的出现了。

 

    但李金羽的回答是:我不是救世主。

 

人的一生,有些东西是注定的。李金羽信奉这一说法。

 

或许,从张引带着李金羽上路开始,俱乐部与国家队的起落,张扬与创意的辩争,就注定要与李金羽结伴而行。

 

1985年, 沈阳铁路小学的操场,两个小孩围着一个足球,一对一。其中一个稍高的男孩控球,矮个男孩抢球。二十分钟过后,矮个没有摸到球皮,只见他涨红了脸,使尽招 数,但仍然功亏一篑。围观的人堆里,一个老者微笑着看着,另一个中年男子则显得有些焦急,偶而还用关切的目光探视老者。

 

老者叫停了男孩的对抗,对中年男子说:“行了,先带他来试试吧。”不曾想,这一试,就是九年。那位老者,就是时任辽宁省体校教练的张引,而那个矮个男孩就是李金羽,至于中年男子,自然是李金羽的父亲李贵军。

 

据张引回忆,他在此前就去铁路小学挑选足球苗子,选了五六人,其中没有李金羽,因为他个子小,速度太慢。几天后,李贵军又拉着李金羽找张引,这才有了上面的那个故事。

 

“那一次,我看出了一点味道,这孩子很顽强。身体条件不好,但很爱动脑。”时隔22年,张引仍然清楚地记得自己当时的判断。

 

     随着日复一日的训练,张引发现李金羽身上更多的特点:1.对胜负非常在意。即便是队内比赛,输了球,李金羽也会哭;2.有股狠劲。有一次李金羽右脚踝关节受伤,他就练左脚射门。等他养好伤,张引发现,这孩子用原先并不擅长的左脚射门时,比右脚更有力。李霄鹏说起李金羽,提供了跟张引观点类似的例子。李金羽没去巴西的时候,李霄鹏就和他认识了。当时山东青年队经常找辽宁青年队打比赛,因为李金羽长得小,所以管他叫小尾巴。“大羽这孩子,很要强,输球会哭,但被大孩子欺负了绝对不哭。”李金羽去了山东鲁能后,有一次右脚十字韧带断裂,不能练。当时球队在海口冬训,为了让伤好得快一点,他跑到海里,把腰以下的部位全部放到冰冷的海水里。“是张导,教会了我一个工作的概念。”李金羽说。

 

1993年,李金羽入选健力宝青年队,远赴巴西。三年后,李金羽回来了。李贵军最早发现了儿子身上的变化:爱吃鸡蛋了。巴西的艰苦生活逼着李金羽改掉了挑食的毛病。

 

但变化最大的还在足球方面。李金羽说:“没出国前,对自己特没信心,也不知道踢得好还是坏。从巴西回来,信心强了很多。”李金羽认为,那时最大的收获,是“找到了一种对足球的爱的感觉”。

 

而呈现在球迷面前的,则是李金羽进球后那眩目的庆祝动作,在当时的中国足坛,犹如一股春风,吹醒了一种叫做“创意”的东西。老球迷都会记得,1998年亚运会,李金羽跟队友一起,一场一个花样地庆祝进球。人们第一次发现,原来中国足球也可以这样玩。

 

但新事物的出现,往往会带来两种截然不同的声音。随着李金羽在国家队无法获得稳定的进球,“张扬”压倒了“创意”。于是,争议再度出现。

 

“我觉得张扬这词挺没深度的。足球本身就是激情、快乐、野蛮、冲撞,这是一种工作

状态。”触及这个话题,李金羽强烈地表现出了表达欲,“他们说的张扬,就像《亮剑》的

亮剑精神,明知自己不行,还非得去‘得瑟’一下。这是我的理解,(我)没什么文化。”

 

李金羽身边的人用同样激烈的语气表达了对此类批评的不屑。李贵军说:“要是像老黄牛似的,进了球也不吭气,那能叫足球吗?”肇俊哲说:“年轻人就要有个性发挥。”

 

但辽宁队的跟队记者闻锐锋认为,其实外界对于李金羽“张扬”的批评,有一部分还来

自于其场外的表现。据闻锐锋回忆,因为李金羽接受采访时态度不好,有一次几个记者联手

写稿批评他。事后,李金羽作了反省,后来就对记者很配合。

 

“太张扬了,有时候还挺直的,执著,挺可爱的。”闻锐锋说。

 

记者李响则用亲身体验印证了闻锐锋的说法。2000年,李响第一次采访李金羽时,后者在电话里跟李响讲了一个多小时的战术,最后来一句“听明白了吗?其实,足球很简单”。

 

几种声音,纠缠了李金羽十年。深爱足球、不服输、执拗、率性,这些都印证了一句叫做“性格即命运”的陈词滥调。此时,就在记者一米远的地方,李金羽说话时眉头紧锁,语气急促,看上去,声称已能想开的他无法真正做到释然。路人丢出的石头仍然会砸痛他。

 

其实,石头不仅会让人痛,也会令人清醒,令人保持方向感。或许可以请李金羽作此设想:如果某一天他不再有争议,那将是他的幸运抑或不幸?好在,李金羽仍在前行。

 

     

 

同一年代出生的人,或多或少,都会有一些相同的痕迹。比如生于20世纪70年代的人,脑海中总会存留一些情结。一把酷毙了的仿真手莫道不消魂枪,一辆崭新的山地车,一根乌黑的麻花辫

子,甚至是,一条若隐若现的内衣肩带。这些都可能扎根心底,相伴你的一生。

 

1977年出生的李金羽的脑子里,存着一列老长老长的玩具火车,还有一张配套的地图,

有山有水,可以在家里摆在地板上玩。李金羽说,时至今日,他还在寻找。“人嘛,要发自

内心地喜欢一样东西是很难的。”刚挣钱那会儿,李金羽喜欢时尚玩意。在辽宁队那一段时间,他的手机每隔一段时间就换一个,买到最后,手机堆积如山,父亲李贵军捡儿子的手机都用不过来。据李霄鹏回忆,李金羽钟爱名表,有一次上街看中一个PANERAI的表,但当时没带够

钱,结果当晚失眠,第二天一早就把钱取了,买了回来。有时买了表,还爱显摆,会故意在大伙面前看表,自言自语,现在几点了啊。

 

     与 一般男孩子不同的是,李金羽还挺喜欢化妆品。有一次去买了护肤的,擦了几次感觉特别好,因为擦完了之后,大家都说他脸色很好。可后来才发现,那是带粉底 的,女用的。李金羽说自己比较能接受新鲜事物。慢慢地,他发现喜欢的东西越来越集中了。吃饭时,来去都是那几样菜,买衣服也是,一屋子一样的衣服,一个类 型的。“人越大,喜欢的

东西越来越少了。”现在,被李金羽反复提及的东西,有一个共性:纯粹。

 

茶。队友李雷雷引导李金羽爱上了喝茶。相邻而居的哥俩经常可以一杯普洱一盘瓜子,说不上几句话,一个晚上就这么打发掉了。

 

朋友。李金羽所定义的朋友,是那种可以一起喝点小酒吃点烤肉,卸下所有掩饰,聊到忘我,“和他们在一起,你会感觉时间停止了。”这样的朋友,不多。

 

李铁认识李金羽有22年了,但以前两人的关系较冷淡,“当时就想着自己那点事儿,过

得稀里糊涂的,对于从小一起长大的人,有一些忽视。”李铁说。慢慢地,两个性格完全不

同的人,在互相陌生了22年后,关系开始变得越来越亲密。李铁说:“大概是因为两人走的

路越来越多,对于人生,有了共同的感悟。”

 

爱情。在李金羽看来,喜欢一个人就对她好,不喜欢拉倒。“爱情这东西,阶段性特别

强。”据熟悉李金羽的记者透露,李金羽和女友孙宁对这段感情都没太大信心。

 

还有,足球。2006年,李金羽29岁,在他眼里,这一年是个转折。“29岁以前,我是

为了进球而进球。29岁以后,我开始意识到团队最重要,为了球队,我会把进球机会让给别人。”李金羽对李霄鹏说。从那时起,李金羽觉得眼前的路变得前所未有的宽阔。

 

他说他对足球充满感恩,因为足球带给他丰厚的回报;他和山东的一个房地产企业有个约定,李金羽每在联赛中进一个球,该企业就会资助10个 失学儿童;他说前两年联赛不降级的决策者“脑子进了水”,但中国足球会越来越好,因为球场上还是美好的东西多;他说球场上的自己有点病态;他说齐达内顶翻 马特拉齐是“大师对自己足球生涯的一种了断”;他说他最欣赏AC米兰,就像一个大家庭,充满了对人性的关爱;他说他很幸运,因为要踢到他现在这种高度,不 是件容易的事⋯⋯

 

李金羽说,这个球,我还可以踢五年。

 

• • • •

 

“如果将来我当教练,一定会个性鲜明,穿着得体的衣服,挺帅的,就像我们的教练

图拔,也不跳也不闹。如果再能像安切洛蒂那样,带几根白头发,就完美了。”李金羽形象

地勾画了自己将来的角色。

 

当教练的念头并非一开始就有,孩提时代的李金羽,甚至一度希望自己能成为一个游戏

机店的主人。当了球员以后,匆匆忙忙地一路踢过来,也没太多空闲去规划未来。

 

直到最近,李金羽发现自己的思想其实挺适合去当个教练。“以前觉得教练不重要,有一群好球员,踢呗。但现在不这样想了,教练对于一个球队来讲,是决定性的。”他说这几年自己会做一些铺垫工作,看看是不是真的有机会去实现这个愿望。

 

至于眼下,李金羽还有一个现实的愿望:参加2008奥运会。“特别想去,毕竟是在家门口,一辈子也许就这么一次。”不过他也清楚,三个超龄名额,要想挤进去,可能比拿下最佳射手还要难。

 

“无论如何,我会再搏一把。”宣言者仰脖饮尽杯中最后一口饮料。

Leave a comment