<?xml version="1.0" encoding="GBK"?>
<?xml-stylesheet href="/style/rss.css" type="text/css"?>
<rss version="2.0" xmlns:eb="http://blog.tom.com/">
<channel>
  <title>爬爬虫</title>
  <link>http://blog.tom.com/bgun123</link>
  <description><![CDATA[我是可爱的虫虫，我爬得很慢很慢，但是我会一直努力爬的...爬爬虫 ]]></description>
  <language>zh</language>
  <generator>newblog.tom.com RSS</generator>
  <pubDate></pubDate>    <item>
		<title><![CDATA[ 串口(DB9)转RJ45的转接头的接线方法 ]]></title>
		<link>http://blog.tom.com/bgun123/article/780.html</link>
		<description><![CDATA[ 串口(DB9)到RJ45的转接头是目前常用的转接头，广泛用于路由器，交换机网络设备的串口管理。高端服务器串口到Console服务器的连接。<br>
<br>
需要的备件：DB9转RJ45转换器2个，标准100M以太网线一根（别拿对接线来忽悠我啊）<br>
<br>
DB9转RJ45头制作步骤：<br>
1. 检查自己购买的DB9-RJ45转换器，应该还没有接线;<br>
<br>
<img src="http://www.fourpair.com/ccp51/media/images/product_category/503181.jpg"><br>
2. 按照下图接线：<br>
<br>
<img src="http://www.ekf.de/c/ccom/cu4/cu4_adp232.gif"><br>
<br>
DB9转RJ45连线连接图<br>
<br>
<table style="width: 503px; height: 205px;" border="1" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<td style="text-align: center;">&nbsp;RJ45</td>
<td style="text-align: center;">&nbsp;线色</td>
<td style="text-align: center;">&nbsp;DB9</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;1</td>
<td style="text-align: center;">&nbsp;蓝</td>
<td style="text-align: center;">&nbsp;7</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;2</td>
<td style="text-align: center;">&nbsp;灰<br></td>
<td style="text-align: center;">&nbsp;4</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;3</td>
<td style="text-align: center;">&nbsp;黑</td>
<td style="text-align: center;">&nbsp;3</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;4</td>
<td style="text-align: center;">&nbsp;红</td>
<td style="text-align: center;">&nbsp;5</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;5</td>
<td style="text-align: center;">&nbsp;绿</td>
<td style="text-align: center;">&nbsp;1</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;6</td>
<td style="text-align: center;">&nbsp;黄</td>
<td style="text-align: center;">&nbsp;2</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;7</td>
<td style="text-align: center;">&nbsp;棕</td>
<td style="text-align: center;">&nbsp;6</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;8</td>
<td style="text-align: center;">&nbsp;白</td>
<td style="text-align: center;">&nbsp;8</td>
</tr>
</tbody>
</table>
<br>
&nbsp;&nbsp;&nbsp; 制作过程中不需要关心RJ45端的线序设定，因为转换头中与RJ45端的连线厂家已经按照工业表标准接好，我们需要关心的时DB9端的线序设定。不同的设备连线的线序与电器性能有非常密切的关系，所有转换其的母头与RJ45连线的接驳顺序要用户自己设定。在我们制作时只需要关心DB9端的连线顺序。接线是一个不逆过程，所以一定要在看清楚之后再连线。
<p>&nbsp;&nbsp;&nbsp; 如果你有已有一条Console线，那么只需要制作一个DB9Z转RJ45转换器即可，若没有则需要制作两个转其器和一条全反线。全反线制作非常简单，根据它的名称来看只要保证水晶头两端的的线序完全相反即可。</p>
<p>做好后可以用在Linux上对主机串口进行配置，然后从windows连接该Linux主机串口：</p>
<p>linux 主机设置</p>
<table style="border: 1px solid rgb(153, 153, 153); width: 80%; font-size: 12px;" align="center">
<tbody>
<tr>
<td><br>
[root@lab etc]# vim inittab<br>
<br>
# When our UPS tells us power has failed, assume we have a few minutes<br>
# of power left.&nbsp; Schedule a shutdown for 2 minutes from now.<br>
# This does, of course, assume you have powerd installed and your<br>
# UPS connected and working correctly.<br>
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"<br>
<br>
# If power was restored before the shutdown kicked in, cancel it.<br>
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"<br>
<br>
<br>
# Run gettys in standard runlevels<br>
1:2345:respawn:/sbin/mingetty tty1<br>
2:2345:respawn:/sbin/mingetty tty2<br>
3:2345:respawn:/sbin/mingetty tty3<br>
4:2345:respawn:/sbin/mingetty tty4<br>
5:2345:respawn:/sbin/mingetty tty5<br>
6:2345:respawn:/sbin/mingetty tty6<br>
<span style="font-weight: bold; color: rgb(255, 1, 2);">7:2345:respawn:/sbin/mingetty ttyS0<br></span>
<table style="border: 1px solid rgb(153, 153, 153); width: 80%; font-size: 12px; font-weight: bold; color: rgb(255, 1, 2);" align="center">
<tbody>
<tr>
<td>设定普通允许串口登陆</td>
</tr>
</tbody>
</table>
<br>
# Run xdm in runlevel 5<br>
x:5:respawn:/usr/bin/gdm<br>
#x:5:respawn:/etc/X11/prefdm -nodaen<br>
：wq<br>
<br>
[root@lab etc]#killall -HUP init<br>
[root@lab etc]# useradd yangj<br>
[root@lab etc]# passwd yangj<br>
Changing password for user yangj.<br>
New UNIX password:<br>
Retype new UNIX password:<br>
passwd: all authentication tokens updated successfully.<br>
<br>
<table style="border: 1px solid rgb(153, 153, 153); width: 80%; font-size: 12px; color: rgb(255, 1, 2); font-weight: bold;" align="center">
<tbody>
<tr>
<td>设定用于连接的普通用户，默认情况linux不允许ｒｏｏｔ　直接通过串口登陆。</td>
<td style="vertical-align: top;"><br></td>
</tr>
</tbody>
</table>
<br></td>
</tr>
</tbody>
</table>
<br>
<br> ]]></description>
		<eb:creationDate>2008-02-26 14:03:26</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ Solaris下怎么将缺省的Display Manager从cde-login替换为GDM ]]></title>
		<link>http://blog.tom.com/bgun123/article/778.html</link>
		<description><![CDATA[ 1. 什么是cde-login?<br>
<br>
cde-login是Solaris缺省的X系统的显示管理程序，在x86上它运行在Xorg之上，用来管理X系统中用户登录和Xorg服务器的监视和管理。它向用户提供GNOME和CDE的X桌面应用环境。<br>
<br>
cde-login在solaris中是一个smf的服务，可以通过svcs,svcadm,svcprop来监视和管理。<br>
<br>
2. 什么是GDM?<br>
<br>
GDM顾名思义就是GNOME组织开发的显示管理程序。它的功能与cde-login是相同的。gdm在solaris下也是一个smf的服务。在Solaris 10中，服务名称为gdm2-login，在SNV中为gdm。<br>
<br>
3. 怎么将缺省的display manager从cde-login换为GDM呢？<br>
<br>
步骤如下：<br>
1) 禁用缺省的cde-login;<br>
# svcadm disable cde-login<br>
注意该命令会导致你的X会话立刻全部终止退出；有可能丢失数据。<br>
2) 启用gdm;<br>
# svcadm enable gdm<br> ]]></description>
		<eb:creationDate>2008-02-22 12:10:41</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ 怎么解决启动Firefox时提示“Firefox已经在运行”的问题 ]]></title>
		<link>http://blog.tom.com/bgun123/article/776.html</link>
		<description><![CDATA[ 在Solaris上使用Firefox时，特别是在多个网络终端上以同一个NIS用户登录的时候，经常会遇到启动Firefox时提示“Firefox已经在运行”的问题。一般来说，这个问题是由于Firefox软件（ThunderBird也是一样的）运行时，为了防止其他程序修改正在使用的Profile，设了一个锁定的机制，从而导致新的Firefox进程不能打开原来Profile中的配置文件而造成的。简单的解决方法如下：<br>
<br>
* 登录到目前运行了firefox的机器，使用pkill firefox杀掉已经在运行中的firefox即可。<br>
<br>
但是由于某些缺陷，也会发生明明在任何机器上当前都没有运行Firefox还发生同样问题的情况。其实原因也很简单，就是由于Firefox进程被异常终止，这样，虽然进程没有了，但是保持锁定(lock)状态的文件还存在，在用户试图启动Firefox时，检测到该文件仍然存在，就报错了。解决方法也很简单，就是删除这个不正常的状态锁定文件。在不同的操作系统中该状态锁定文件也有些不一样。<br>
<br>
Solaris/Linux:<br>
$HOME/.mozilla/firefox/[xxxxxxxx].default/lock<br>
$HOME/.mozilla/firefox/[xxxxxxxx].default/.parentlock<br>
<br>
Windows 2000/XP:<br>
C:\Documents and Settings\&lt;user name&gt;\Application Data\Mozilla\<br>
Firefox\[xxxxxxxx].default\parent.lock<br>
<br>
Vista:<br>
C:\Users\&lt;user name&gt;\AppData\Roaming\Mozilla\<br>
Firefox\[xxxxxxxx].default\parent.lock<br>
<br>
Max OS X:<br>
~/Library/Mozilla/<br>
~/Library/Application Support/<br>
Firefox\[xxxxxxxx].default\.parentlock<br>
<br>
<br>
<br>
<br>
<br>
<br> ]]></description>
		<eb:creationDate>2008-02-13 13:28:08</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ Solaris下的BSM audit审计系统 ]]></title>
		<link>http://blog.tom.com/bgun123/article/766.html</link>
		<description><![CDATA[ 1)&nbsp; &nbsp; &nbsp; &nbsp; 开启BSM：<br>
# init 1&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;(重新引导或改变运行级别到单用户状态)<br>
#/etc/security/bsmconv&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;(运行BSM初始化脚本，开启审计功能)<br>
# reboot&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;(重新启动系统，或者Ctrl+D改变到多用户状态)<br>
2)&nbsp; &nbsp; &nbsp; &nbsp; 关闭BSM审计功能：<br>
# init 1<br>
# /etc/security/bsmunconv<br>
# reboot<br>
3)&nbsp; &nbsp; &nbsp; &nbsp; 配置文件的功能：<br>
<br>
BSM所有的配置文件都存放在/etc/security目录下( (4)代表详细信息察看man (4) )：<br>
&nbsp; &nbsp; &nbsp; &nbsp; audit_class(4)<br>
审计类别定义<br>
&nbsp; &nbsp; &nbsp; &nbsp; audit_control(4)<br>
审计进程控制信息<br>
&nbsp; &nbsp; &nbsp; &nbsp; audit_data(4)<br>
审计进程当前信息<br>
&nbsp; &nbsp; &nbsp; &nbsp; audit.log(4)审计日志格式<br>
&nbsp; &nbsp; &nbsp; &nbsp; audit_event(4)<br>
时间定义到类别的映射文件<br>
&nbsp; &nbsp; &nbsp; &nbsp; audit_user(4)<br>
按用户审计时的用户定义文件<br>
<br>
除了上面的配置文件之外，系统中还有一些用于BSM管理的脚本。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; audit_startup(1M) - 启动BSM进程运行。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auditconfig(1M) - 读取配置文件，重新配置audit进程。<br>
&nbsp; &nbsp; &nbsp; &nbsp; auditd(1M) - 审计监控服务。<br>
&nbsp; &nbsp; &nbsp; &nbsp; auditreduce(1M) - 审计事件日志管理，可以调整日志格式，生成时间周期等信息。<br>
&nbsp; &nbsp; &nbsp; &nbsp; auditstat(1M) - 显示内核审计进程状态。<br>
&nbsp; &nbsp; &nbsp; &nbsp; bsmconv(1M) - 开启BSM功能。<br>
&nbsp; &nbsp; &nbsp; &nbsp; bsmunconv(1M) - 关闭BSM功能。<br>
&nbsp; &nbsp; &nbsp; &nbsp; praudit(1M)- 打印BSM审计日志内容。<br>
4)&nbsp; &nbsp; &nbsp; &nbsp; BSM应用<br>
&nbsp; &nbsp; &nbsp; &nbsp; 在默认配置情况下，BSM每天(24小时)会生成一个以当天日期为名字的审计日志，存放在/var/audit目录下，这个文件具有自己的数据结构，所以直接查看时是乱码，必须使用系统命令 praudit来查看。<br>
# praudit /var/audit/xxxxxx.xxxxxx.log<br>
&nbsp; &nbsp; &nbsp; &nbsp; 另一个可能用到的命令是auditreduce ，这个命令允许管理员对审计日志做一些设置，例如调整审计事件集或调整审计日志生成周期等等。auditreduce和praudit是系统中BSM管理最基本的两个命令，组合起来可以完成相当多的功能：<br>
用管道联合两个命令，会显示系统中所有的历史审计事件。<br>
# auditreduce | praudit<br>
再加上lp，将把所有审计事件直接打印出来。<br>
# auditreduce | praudit | lp<br>
如果系统中有相当多的审计信息的话，查找将是非常困难的事情，这条命令可以按照yymmdd的时间格式显示目标时间段内的审计事件，范例为显示April 13, 1990, 用户fred的 登录类别 审计事件集。<br>
# auditreduce -d 900413 -u fred -c lo | praudit<br>
过滤目标时间所有的登录日志信息(Class:lo)，并且输出到一个单独的日志文件中：<br>
# auditreduce -c lo -d 870413 -O /usr/audit_summary/logins<br>
auditreduce的 -b 和 -a 选项允许用户按照 yyyymmdd00:00:00 的时间格式制定一个时间段(Before &amp; After)。<br>
# auditreduce -a 91071500:00:00 | praudit<br>
# auditreduce -b 91071500:00:00 | praudit<br>
5)&nbsp; &nbsp; &nbsp; &nbsp; 管理工具：<br>
&nbsp; &nbsp; &nbsp; &nbsp; eXpert-BSMTM<br>
一个很强大的商业BSM分析工具，不过目前也可以免费使用，支持Solaris 7/8 (Sparc|Intel)平台，可以在下面地址下载。<br>
http://www.sdl.sri.com/projects/emerald/releases/eXpert-BSM/download.html<br>
&nbsp; &nbsp; &nbsp; &nbsp; Sun WBEM<br>
Solaris内置的图形界面管理工具，也就是AdminConsole，在WBEM 2.3之后的版本支持对BSM信息的管理。可以用下面命令开启：<br>
# /usr/sadm/bin/wbemadmin&nbsp; &nbsp;&nbsp; &nbsp; (第一次运行时会安装一系列的管理脚本)<br>
# /usr/sadm/bin/smc&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; (开启管理终端)<br>
<br> ]]></description>
		<eb:creationDate>2008-01-17 17:24:55</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ 怎么在Redirect的Console上输入特殊功能键 ]]></title>
		<link>http://blog.tom.com/bgun123/article/765.html</link>
		<description><![CDATA[ 该方法也可以用于Serial Console.<br>
<span id="ArticleContent1_ArticleContent1_lblContent">通过Serial Console管理服务器，通常需要输入一些特殊的功能键，如F2进入BIOS,<br>
F12网络引导系统。下面是SUN公司机器上一些常用键在Serial Console上的转义序列：<br>
<br></span><a name="pgfId-1005794" id="pgfId-1005794"></a><a name="60056"></a>Special Keys for Remote Console Terminal<br>
<br>
<table dir="ltr" bordercolorlight="#FFFFFF" bordercolordark="#000000" border="1" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005802" id="pgfId-1005802"></a>HOME</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005804" id="pgfId-1005804"></a>ESC+h(下面省略ESC)</p>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005806" id="pgfId-1005806"></a>END</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005808" id="pgfId-1005808"></a>k</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005810" id="pgfId-1005810"></a>INSERT</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005812" id="pgfId-1005812"></a> +</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005814" id="pgfId-1005814"></a>DELETE</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005816" id="pgfId-1005816"></a> -</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005818" id="pgfId-1005818"></a>PAGE UP</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005820" id="pgfId-1005820"></a> ?</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005822" id="pgfId-1005822"></a>PAGE DOWN</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005824" id="pgfId-1005824"></a> /</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005826" id="pgfId-1005826"></a>ALT</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005828" id="pgfId-1005828"></a>^A</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005830" id="pgfId-1005830"></a>CTRL</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005832" id="pgfId-1005832"></a>^C</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005834" id="pgfId-1005834"></a>F1</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005836" id="pgfId-1005836"></a> 1</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005838" id="pgfId-1005838"></a>F2</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005840" id="pgfId-1005840"></a> 2</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005842" id="pgfId-1005842"></a>F3</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005844" id="pgfId-1005844"></a> 3</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005846" id="pgfId-1005846"></a>F4</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005848" id="pgfId-1005848"></a> 4</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005850" id="pgfId-1005850"></a>F5</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005852" id="pgfId-1005852"></a> 5</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005854" id="pgfId-1005854"></a>F6</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005856" id="pgfId-1005856"></a> 6</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005858" id="pgfId-1005858"></a>F7</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005860" id="pgfId-1005860"></a> 7</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005862" id="pgfId-1005862"></a>F8</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005864" id="pgfId-1005864"></a> 8</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005866" id="pgfId-1005866"></a>F9</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005868" id="pgfId-1005868"></a> 9</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005870" id="pgfId-1005870"></a>F10</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005872" id="pgfId-1005872"></a> 0</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005874" id="pgfId-1005874"></a>F11</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005876" id="pgfId-1005876"></a> !</p>
</td>
</tr>
<tr>
<td scope="row" rowspan="1" colspan="1">
<p><a name="pgfId-1005878" id="pgfId-1005878"></a>F12</p>
</td>
<td rowspan="1" colspan="1">
<p><a name="pgfId-1005880" id="pgfId-1005880"></a> @</p>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<p><a name="pgfId-1005798" id="pgfId-1005798"></a></p>
<br>
譬如F12，你只要按下ESC+shift+2即可，因为shift+2 = @<br>
<br> ]]></description>
		<eb:creationDate>2008-01-17 15:28:51</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 6 ]]></title>
		<link>http://blog.tom.com/bgun123/article/763.html</link>
		<description><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 6<br>
<br>
其他SCCS命令<br>
<br>
&nbsp;注意：使用非SCCS命令对SCCS文件进行操作将可能破坏SCCS文件。<br>
<br>
下列SCCS命令共同组成了一个完整的系统，以对SCCS文件进行各种操作：<br>
<br>
rmdel&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;从SCCS文件中删除最近的对分支所做的修改（delta）。<br>
sact&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;显示当前的SCCS文件编辑状态。<br>
sccs&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SCCS系统的管理程序。sccs命令包含了一组伪命令，可以提供大多数的SCCS服务。<br>
sccshelp&nbsp;&nbsp; &nbsp;详细说明每一个SCCS错误信息和命令。<br>
unget&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;消除上一个get -e命令的所有效果。<br>
val&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;检查SCCS文件以查看其计算出来的校验和是否与头部保存的校验和一致。<br>
vc&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;替换标识关键字的指定值。<br>
what&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;按照指定的匹配模式搜索系统文件，并显示其后的文本。 ]]></description>
		<eb:creationDate>2008-01-03 14:47:23</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 5 ]]></title>
		<link>http://blog.tom.com/bgun123/article/762.html</link>
		<description><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 5<br>
<br>
===检测和修复被破坏的SCCS文件===<br>
<br>
你可以使用admin命令检测和修复被破坏的SCCS文件。<br>
<br>
具体操作过程<br>
<br>
1. 对SCCS文件做一个基本检查，确定可能发生了那些破坏。一旦没有正确的使用SCCS命令来修改SCCS文件，就可以导致文件被破坏。SCCS文件系统通过计算文件的校验和并将它与delta表中存贮的值相比较来检测是否发生了破坏。可以通过运行admin命令带上-h标记来检测所有SCCS文件或者SCCS目录发生的破坏，如下所示：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; admin -h s.file1 s.file2 ...<br>
<br>
&nbsp;&nbsp;&nbsp; 或者<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; admin -h directory1 directory2 ...<br>
<br>
如果admin命令发现某个文件的计算得到的校验和与SCCS文件头中的校验和不相同，它将显示如下信息：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR [s.filename]:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1255-057 The file is damaged. (co6)<br>
<br>
2. 如果文件被破坏，可以尝试重新编辑该文件或者从一个备份中读取信息。一旦校验和被重新计算，将不可能再通过admin命令来检测其余可能的破坏。<br>
<br>
注意：对一个被破坏的文件使用admin命令带上-z标记将可能阻止在未来对该文件的破坏检测。<br>
<br>
3. 在修复文件后，运行admin命令带上-z标记和被修复的文件名字：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; admin -z s.file1<br>
<br> ]]></description>
		<eb:creationDate>2008-01-03 14:33:45</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 4 ]]></title>
		<link>http://blog.tom.com/bgun123/article/761.html</link>
		<description><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 4<br>
<br>
===控制和跟踪SCCS文件的变化===<br>
<br>
SCCS命令和文件系统主要用来控制对文件的访问和追踪谁改变了文件，为什么改变该文件，以及做了哪些改变。<br>
<br>
=====控制对SCCS文件的访问=====<br>
<br>
在SCCS文件系统中可以控制以下3种方式的访问：<br>
<br>
* 文件访问<br>
* 用户访问（用户访问控制）<br>
* 版本访问（版本访问控制）<br>
<br>
=====文件访问控制=====<br>
<br>
包含SCCS文件的目录应该以访问权限码755来创建（所有者具有读，写和执行权限；组成员和其他人具有读和执行权限）。SCCS文件自己应该创建为只读文件（444）。使用这些访问权限许可，只有所有者可以使用非SCCS命令来修改SCCS文件。如果需要一个组能够访问和修改SCCS文件，目录的权限应该允许组成员进行写。<br>
<br>
=====用户访问控制=====<br>
<br>
使用admin命令带上-a标记可以指定允许某用户组可以修改SCCS文件。在该标记后还可以指定组名字或者组号。<br>
<br>
=====版本访问控制=====<br>
<br>
通过在头部使用相应的标记，admin命令可以锁定，防止文件的各种版本被get命令访问。<br>
<br>
-fc &nbsp;&nbsp; &nbsp;设定可以被检索到的最高版本号<br>
-ff &nbsp;&nbsp; &nbsp;设定可以被检索到的最低版本号<br>
-fl &nbsp;&nbsp; &nbsp;锁定一个特定的版本，以免被检索到<br>
<br>
=====追踪对SCCS文件的修改=====<br>
<br>
有三种方法可以用来追踪对SCCS文件的修改：<br>
<br>
* 每一个修改delta的备注信息<br>
* 修改请求(MR)号码<br>
* SCCS命令<br>
<br>
通过每次修改（Delta）的备注信息追踪变化<br>
<br>
在一个SCCS文件被更新，一个新的delta被创建后，系统将会提示输入与该delta相关的备注信息。备注信息最长512个字符，而且可以使用cdc命令来修改。<br>
<br>
cdc &nbsp;&nbsp; &nbsp;修改与delta相关的备注信息<br>
<br>
get命令带上-l标记将打印出文件任何一个版本的delta表和所有的delta的备注信息。除了存贮与delta相关的备注信息外，delta表中还自动存贮了最后一次修改的日期和时间，修改时的真实用户ID, delta的序列号和它的前辈，以及与该delta相关的任何MR号码。<br>
<br>
通过修改请求号码追踪变化<br>
<br>
admin命令带上-fv标记将在每次创建delta时提示输入MR号。可以指定一个程序带上-fv标记来在试图创建SCCS文件的新的delta时检查MR号的有效性。如果这个MR有效性检查程序返回一个非0的exit值时，更新将不会成功。<br>
<br>
MR有效性检查程序将由用户自己创建。它可以被用来追踪对SCCS文件的修改，并将这些修改与其他数据库和追踪系统关联起来。<br>
<br>
通过SCCS命令追踪变化<br>
<br>
sccsdiff &nbsp;&nbsp; &nbsp;比较两个SCCS文件的不同，并在标准输出中打印其不同<br>
<br>
在更新文件时，在delta命令后带上-p标记将起到与sccsdiff完全相同的效果。这两个命令都允许你观察不同版本之间的具体变化。<br>
<br>
prs &nbsp;&nbsp; &nbsp;以标准格式显示SCCS文件的指定部分到标准输出<br>
<br>
该命令允许你发现文件的两个不同版本之间的区别。<br>
<br>
<br> ]]></description>
		<eb:creationDate>2008-01-03 14:19:40</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 3 ]]></title>
		<link>http://blog.tom.com/bgun123/article/759.html</link>
		<description><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 3<br>
<br>
===创建，编辑和更新SCCS文件===<br>
<br>
你可以使用admin,get和delta命令来创建，编辑和更新SCCS文件。<br>
<br>
=====创建一个SCCS文件=====<br>
<br>
admin&nbsp;&nbsp;&nbsp; 创建一个SCCS文件或者修改已经存在的SCCS文件。<br>
<br>
*&nbsp;&nbsp; 要创建一个空的名字为s.test.c的SCCS文件，输入：<br>
&nbsp;&nbsp; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; admin -n s.test.c<br>
<br>
&nbsp;&nbsp;&nbsp; 使用admin命令带-n标记可以创建一个空的SCCS文件。<br>
<br>
*&nbsp;&nbsp; 将已经存在的文本文件转换为SCCS文件，输入：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; admin -itest.c s.test.c<br>
<br>
&nbsp;&nbsp;&nbsp; 该文件中没有SCCS标识关键字（cm7）。<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s.test.c test.c<br>
<br>
&nbsp;&nbsp;&nbsp; 如果你使用-i标记，admin命令将从一个指定的文件创建一个delta 1.1的SCCS文件。一旦delta 1.1被创建，将修改原来的文本文件的名字，以免它会被SCCS命令所影响（它将被作为一个备份使用）：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv test.c back.c<br>
<br>
&nbsp;&nbsp;&nbsp; 如果显示“There are no SCCS identification keywords in the file (cm7)”信息，这并不表示有错误发生。<br>
<br>
*&nbsp;&nbsp; 要以版本号3.1开始使用test.c文件，请在admin命令中使用-r标记，如下所示：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; admin -itest.c -r3 s.test.c<br>
<br>
=====编辑一个SCCS文件=====<br>
<br>
注意： 不要使用非SCCS命令来直接编辑一个SCCS文件，否则你可能会破坏SCCS文件。<br>
<br>
get&nbsp;&nbsp; 获取某个版本的SCCS文件以编辑和编译。<br>
<br>
1. 要编辑SCCS文件，可以输入get命令带上-e标记来生成一个可以编辑的文件版本：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get -e s.test.c<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new delta 1.4<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 67 lines<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.test.c s.test.c test.c<br>
<br>
&nbsp;&nbsp;&nbsp; get命令将生成两个新文件，p.test.c 和 test.c。其中test.c就是可以编辑的文件。p.test.c file 文件是一个临时的，不可以编辑的文件。它被SCCS用来跟踪文件的版本。当你将你的修改更新到SCCS文件中以后，该临时文件就会消失。要注意的是get命令同时还会打印用来生成编辑文件的文件版本的SID,分配给你在更新修改时将使用的新的delta的SID,以及文件的行数。<br>
<br>
2. 使用编辑器来编辑test.c,例如：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ed test.c<br>
<br>
&nbsp;&nbsp;&nbsp; 现在你可以在真正的文件上进行工作了。你可以如你所希望的那样经常编辑该文件。你的修改不会对SCCS文件产生任何影响，直到你决定更新它。<br>
<br>
3. 编辑有多个版本的SCCS文件的指定版本，可以输入get命令带上-r标记：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get -r1.3 s.test.c<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 67 lines<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get -r1.3.1.4 s.test.c<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3.1.4<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50 lines<br>
<br>
=====更新SCCS文件=====<br>
<br>
delta&nbsp;&nbsp;&nbsp; 将对SCCS文件文本内容的一系列修改（deltas）加入到SCCS文件。<br>
<br>
1. 要更新SCCS文件，并根据你在编辑时完成的修改创建一个新的delta,可以使用delta命令：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $delta s.test.c<br>
<br>
&nbsp;&nbsp;&nbsp; 输入备注信息，使用EOF结束输入或者用一个空行结束。<br>
<br>
2. delta命令会提示你输入与你之所以进行修改的相应的备注信息。例如，输入备注信息，然后按下两次回车键：<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No id keywords (cm7)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 lines inserted<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6 lines deleted<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12 lines unchanged<br>
<br>
&nbsp;&nbsp;&nbsp; delta命令将会用你对test.c文件的修改来更新s.prog.c文件。delta命令将告诉你新版本的SID是1.2，被编辑的文件被插入了5个新行，删除了6行，而且还有12行相对于上一版本没有变化。<br>
<br>
<br>
<br>
&nbsp; ]]></description>
		<eb:creationDate>2008-01-02 14:39:33</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 2 ]]></title>
		<link>http://blog.tom.com/bgun123/article/758.html</link>
		<description><![CDATA[ SCCS(Source Code Control System - 源代码控制系统) 简介 - 2<br>
<br>
===SCCS标记和参数约定===<br>
<br>
在大多数情况下，SCCS命令接受两种类型的参数：<br>
<br>
标记<br>
<br>
标记由一个-符号(减号),并跟随一个小写字符组成，有时候后面还有有一个数值。标记用来控制命令是如何进行操作的。<br>
<br>
文件和目录<br>
<br>
这些参数指定命令所操作的某个文件和一批文件。使用目录名字作为参数将对该命令下所有的SCCS文件进行操作。<br>
<br>
文件和目录的名字不能以-(减号)开头。如果你单独使用该符号，命令将从标准输入或者键盘输入中读入数据，直到接收到文件结束标志。这在使用操作系统的允许在不同进程之间进行通信的管道功能时是非常有用。<br>
<br>
命令的任何标记都将对该命令行操作的所有文件进行操作，并且操作发生在对该命令的其他参数进行处理之前。标记在命令行中的位置并不重要。其他参数则是按照从左到右的先后顺序来处理的。某些SCCS文件中可能包含某些标记，以确定某些命令将如何对文件进行操作。请参见SCCS文件头部标记的管理命令说明以获取相关的详细信息。<br>
<br> ]]></description>
		<eb:creationDate>2008-01-02 13:50:27</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
</channel>
</rss>