?? 927.html
字號:
</table>
</form>
</TD>
<TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
<TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
<TR>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22
src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0
name=header_r2_c1></TD>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
<DIV align=right><FONT class=normalfont>當(dāng)前位置:
<A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首頁</A>
<font color="#FF6699">>></font>
<A href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">雜項工具</A> | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版權(quán)說明</A></font></DIV>
</TD>
<TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff
border=0>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TR>
<TD vAlign=top align=middle width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
<TBODY>
<TR>
<TD vAlign=top width="80%">
<DIV align=center>
<FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
</FORM>
<TABLE cellSpacing=0 cellPadding=0 width="95%"
border=0><TBODY>
<TR>
<TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif"
height=30></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=3 width="95%"
align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top>
<p><FONT class=normalfont><B><font color=blue>Unix系統(tǒng)下光盤刻錄</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>來自:Linux知識寶庫<br>聯(lián)系方式:無名<br><br>一.CDRTOOLS軟件簡介<br>
幾乎所有的Unix操作系統(tǒng)(如:Solaris、Sun OS、HP-UX、FreeBSD、linux等)都支持該軟件。需要注意的一點是除Linux操作系統(tǒng)外,CDRTOOLS軟件只支持SCSI接口的刻錄機(jī)。CDRTOOLS軟件是一組命令集,它包含四個命令:<br>
Mkisofs:用來生成刻錄CD所需的映像文件。<br>
Cdda2wav:把audio CD片上的內(nèi)容卸載到硬盤上生成聲音文件。<br>
Cdrecord:把各種各樣的聲音數(shù)據(jù)文件刻錄到CDR/CDRW光盤上。<br>
Readcd:含讀寫光盤等功能的菜單式命令。<br>
<br>
二.CDRTOOLS軟件的獲取與安裝<br>
<br>
CDRTOOLS軟件可以從Caldera公司的官方網(wǎng)站上下載ftp://ftp2.caldera.com/pub/skunkware/osr5/fileutil/cdrecord,得到CDRTOOLS軟件后,將下載文件cdrtools-1.8a23-VOLS.tar解包到/ tmp/目錄,執(zhí)行命令:# tar xvf /tmp/cdrtools-1.8a 23-VOLS.tar,此時將生成三個文件,其中VOL.000.000文件為Custom格式的可安裝文件。<br>
然后以root用戶注冊,執(zhí)行custom命令安裝該軟件,步驟如下:<br>
custom→Software→Install New→From scosysv→Media Device→Media Image→Image Directory:/tmp<br>
此時系統(tǒng)便將CDRTOOLS軟件自動安裝到/usr/local目錄下。<br>
<br>
<br>
<br>
三.CDRTOOLS軟件的使用<br>
<br>
1.?dāng)?shù)據(jù)光盤的一次性刻錄<br>
(1)用mkisofs命令將所要刻錄的文件生成映像文件 /tmp/outfile,命令如下:<br>
# mkisofs -L -l -v -r -o /tmp/outfile filename<br>
需要說明的是-r選項的功能是生成Rock Ridge格式的文件。Rock Ridge格式是ISO9660格式的延伸,支持文件名字母的大小寫、符號字符、長文件名以及超過8層的目錄結(jié)構(gòu)。Rock Ridge使CD-ROM能兼容Unix的文件系統(tǒng),因此它在Unix系統(tǒng)上已經(jīng)被廣泛地使用。<br>
(2)將生成的映像文件寫入CDR/CDRW 光盤,執(zhí)行命令:<br>
#cdrecord -v dev=0,2,0 /tmp/outfile speed=8<br>
此命令中dev代表刻錄機(jī)設(shè)備,三個數(shù)字的含義分別為:第一位表示刻錄機(jī)字符設(shè)備/dev/rcd0;第二位表示刻錄機(jī)的SCSI ID號;第三位表示設(shè)備的LUN號。Speed表示寫入速度。<br>
(3)查看光盤上的內(nèi)容,執(zhí)行命令:<br>
#mount -r -f HS /dev/cd0 /mnt<br>
這樣就可以對 /mnt進(jìn)行各種操作:ls、cp等。<br>
上述方法實現(xiàn)的是光盤的一次性寫入,寫入后光盤將不能再追加其他內(nèi)容。<br>
<br>
2.光盤的追加刻錄<br>
第一次寫入時執(zhí)行下列命令:<br>
#mkisofs -L -l -v -r -o /tmp/firstimage<br>
生成映像文件 firstimage.<br>
#cdrecord -v dev=0,2,0 -multi -data firstimage speed=8<br>
將映像文件寫入CDR/CDRW光盤,此命令中的multi選項表示可以追加寫入。<br>
第二次寫入時執(zhí)行下列命令:<br>
#cdrecord msinfo<br>
系統(tǒng)將輸出類似這樣的信息:0,23456,表示上一次寫入的數(shù)據(jù)所占用的空間。<br>
#mkisofs -L -l -v -r -C xx, yy -o /tmp/secondimage<br>
生成映像文件secondimage, xxy、yy即是上一步所得到的值。<br>
#cdrecord -v dev=0,2,0 -multi -data secondimage speed=8<br>
將映像文件寫入CDR/CDRW光盤。如果不想再向此光盤中追加其他的文件,則該命令中的multi 選項可以省略。<br>
查看所刻錄的內(nèi)容,執(zhí)行命令:<br>
#mount -r -f HS /dev/cd0 /mnt<br>
進(jìn)入/mnt目錄可以查看光盤的內(nèi)容。特別值得提到的是,由于SCO OpenServer操作系統(tǒng)的限制,此時僅僅能夠看到第一次寫入的內(nèi)容,對于后來追加的內(nèi)容則看不到。若想看到全部內(nèi)容,可將此光盤放入Windows平臺的計算機(jī)上,此時就可以看到全部內(nèi)容了,這不能不說是一個不小的缺憾。<br>
<br>
3.?dāng)?shù)據(jù)盤的整盤復(fù)制<br>
(1)讀入源盤內(nèi)容,生成映像文件 /tmp/disk.out執(zhí)行命令:<br>
#readcd<br>
0:read 1:veri 2:erase 3:read buffer 4:cache 5:ovtime 6:cap 7:wne 8:floppy 9:verify 10:checkcnds 11:read disk 12:write disk 13:scsireset 14:seektest 15:readda<br>
執(zhí)行以下步驟(以下是一個實例)<br>
Enter selection: 0(0 - 15)/<cr>:11<br>
Capacity:87223 Blocks = 174446 kBytes = 170 Mbytes = 178 prMB<br>
Sectorsize: 2048 Bytes<br>
Copy from SCSI (0,2,0) disk to file<br>
Enter filename [disk.out]: /tmp/disk.out<br>
Enter starting sector for copy: 0(0-87222)/<cr>:<br>
Enter number of sectors to copy: 87223 (1- 87223)/<cr>:87221<br>
此處需特別注意,為防止讀盤時扇區(qū)越界,輸入的扇區(qū)數(shù)應(yīng)是系統(tǒng)提供的扇區(qū)數(shù)減2。<br>
(2)將生成的映像文件/tmp/disk.out寫入目標(biāo)盤,執(zhí)行命令。<br>
#cdrecord -v dev=0,2,0 /tmp/disk.out speed=8 即可刻錄生成相應(yīng)的目標(biāo)盤。<br>
<br>
4.CDRW光盤的格式化<br>
執(zhí)行命令:<br>
#cdrecord -v dev=0,2,0 black=fast<br>
將CDRW光盤快速格式化。它僅刪除PMA、TOC、pregap,所需時間很短。<br>
執(zhí)行命令:<br>
#cdrecord -v dev=0,2,0 blank=all<br>
將CDRW光盤完全格式化,所需時間較長。<br>
<br>
<br>
四、注意事項<br>
<br>
在CDRTOOLS的使用中,還有一些問題需要注意:<br>
1. 為方便查閱聯(lián)機(jī)文檔,可修改/etc/default/man文件,將第17行MANPATH=scohelp:/usr/man改為MANPATH=scohelp:/usr/man:/usr/local/man。<br>
<br>
2. 若執(zhí)行命令:<br>
#chmod 6755 /usr/local/bin/cdrecord<br>
使普通用戶也可以執(zhí)行刻錄操作命令。<br>
<br>
3. 為方便命令的使用,可將/usr/local/bin加入到PATH變量中。<br>
<br>
4. 使用此軟件時可能會感到頻繁敲入命令比較煩瑣,可將上述命令編輯到一個shell程序中,使用起來就方便了。<br>
CDRTOOLS軟件有著豐富的功能,這里不能詳述,更多的用法可參閱聯(lián)機(jī)文檔。通過使用該軟件,我們不但可以建立起可靠的文件備份系統(tǒng),而且對與光盤刻錄相關(guān)的知識將有更系統(tǒng)、完整的學(xué)習(xí)和認(rèn)識。<br>
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文結(jié)束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分類</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技術(shù)類</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基礎(chǔ)知識</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安裝啟動</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">輸入法類</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化漢化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">網(wǎng)絡(luò)配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存儲備份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">雜項工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">編程技術(shù)</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">網(wǎng)絡(luò)安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">內(nèi)核技術(shù)</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度優(yōu)化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服務(wù)</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服務(wù)</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服務(wù)</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服務(wù)</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">網(wǎng)絡(luò)過濾</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服務(wù)</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版權(quán)所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知識寶庫</A><BR>
違者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知識寶庫</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -