📄 164.html
字号:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>www.newok.com::FreeBSD使用大全</title>
<link rel=stylesheet href="newok.css" tppabs="http://www.newok.com/include/newok.css">
</head>
<body>
<div align=center>
<p> </p>
<table width=720>
<tr><td>
<strong>当前所在位置:</strong><a href="javascript:if(confirm('http://www.at.china.com/bsd/index.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.at.china.com/bsd/index.html'" tppabs="http://www.at.china.com/bsd/index.html" class=t1>FreeBSD使用大全>></a>
</td></tr>
</table>
<table width=700>
<tr><th><font color=white>FreeBSD连载(18):软盘操作</font></th></tr>
<tr><td> </td></tr>
<tr><td align=left><i>作者:</i>王波</td></tr>
<tr><td> </td></tr>
<tr><td><font color=white>FreeBSD支持软盘操作,虽然当前计算机上软盘的重要性已经大大减小,但在少量传送数据时,软盘仍不失为一种有效的工具。在软盘上可以使用UFS文件系统或msdos文件系统。<br><br> 在软盘上建立UFS文件系统,便需要使用fdformat作软盘的低级格式化,使用disklabel建立文件系统的标签,然后使用newfs初始化文件系统,最后才使用mount将它安装到目录树上: <br><br># fdformat /dev/rfd0<br>Format 1440K floppy `/dev/rfd0'? (y/n): y<br>Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done.<br># disklabel -r -w fd0 fd1440<br># newfs /dev/rfd0<br>Warning: Block size restricts cylinders per group to 6.<br>Warning: 1216 sector(s) in last cylinder unallocated<br>/dev/rfd0: 2880 sectors in 1 cylinders of 1 tracks, 4096 sectors<br> 1.4MB in 1 cyl groups (6 c/g, 12.00MB/g, 736 i/g)<br>super-block backups (for fsck -b #) at:<br> 32,<br># mount /dev/fd0 /A<br><br> <br> <br><br> 当操作完毕之后必须使用umount /A卸载软盘。<br><br> 也可以直接安装和卸载已有的msdos格式的软盘,并进行访问。 <br><br># mount -t msdos /dev/fd0 /A<br># ls /A<br># umount /A<br><br> <br> <br><br> 使用mtools工具能在软盘上建立msdos文件系统,并进行访问,此时软盘设备并没有安装到目录树上, mtools是使用raw方式对软盘进行访问的。mtools的命令与对应的DOS命令用法相同,只是每个命令以m开头,并且都是小写形式。如mdir对应DOS下的DIR命令,mcd对应DOS下的CD命令,mcopy对应DOS下的 COPY,并且能在FreeBSD的文件系统与DOS的软盘之间传递文件,等等。 <br><br># mformat A:<br># mdir A:<br># mcopy hello.c A:<br><br> <br> <br><br> 但是DOS的文本格式和Unix是不同的,Unix下只使用换行字符来表示换行,而DOS下同时使用换行和回车字符。因此如果将DOS的文件复制到Unix下时,有时候会造成一些小麻烦。如果在vi下打开这种文件,可能会看到这样结果: <br><br>main(){ ^M<br>printf(“Hello! World!”); ^M<br>}^M<br><br> <br> <br><br> ^M代表换行字符,在mcopy中加上-t参数,就可以消除在不同文件系统之间复制文件时的这些问题。如果对已有的文件去除换行字符,可以直接在vi中使用模式替换将这个特殊字符消除(使用^V^M来表示这个特殊字符,即在按下Ctrl键的同时输入V和M),或者使用tr命令: <br><br>$ tr -d “<!-SSE CONTENT SSE->15” < hello.c > hello.unix.c<br><br> <br> <br><br>未完,待续。。。</font></td></tr>
<tr><td> </td></tr>
<tr><td align=right><i>来源:</i><a href="javascript:if(confirm('http://freebsd.online.ha.cn/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://freebsd.online.ha.cn/'" tppabs="http://freebsd.online.ha.cn/">http://freebsd.online.ha.cn/</a></td></tr>
</table>
<p> </p>
<p> </p>
<p> </p>
声明:本站的文章和软件是本人从网上收集整理的(除本人的作品之外),所有版权属于作者,<br>
如有侵犯您的权益,请指出,本站将立即改正,谢谢.
<hr width=500>
<br>
<font color=#ffffff>Copyright 2000 <a href="javascript:if(confirm('http://www.newok.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.newok.com/'" tppabs="http://www.newok.com/" class=t1>www.newok.com</a></font>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -