1082-1084.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 424 行

HTML
424
字号
<HTML>

<HEAD>

<TITLE>Linux Complete Command Reference:Special Files:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=04 //-->

<!-- PAGES=1063-1102 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="1079-1081.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1085-1085.html">Next</A></CENTER></P>







<A NAME="PAGENUM-1082"><P>Page 1082</P></A>









<P>3.5-inch extra density device files:

</P>



<TABLE>



<TR><TD>

Name

</TD><TD>

Capac.

</TD><TD>

Cyl.

</TD><TD>

Sect.

</TD><TD>

Heads

</TD><TD>

Base minor #

</TD></TR><TR><TD>

fdnE2880

</TD><TD>

2880K

</TD><TD>

80

</TD><TD>

36

</TD><TD>

2

</TD><TD>

32

</TD></TR><TR><TD>

fdnCompaQ

</TD><TD>

2880K

</TD><TD>

80

</TD><TD>

36

</TD><TD>

2

</TD><TD>

36

</TD></TR><TR><TD>

fdnE3200

</TD><TD>

3200K

</TD><TD>

80

</TD><TD>

40

</TD><TD>

2

</TD><TD>

104

</TD></TR><TR><TD>

fdnE3520

</TD><TD>

3520K

</TD><TD>

80

</TD><TD>

44

</TD><TD>

2

</TD><TD>

108

</TD></TR><TR><TD>

fdnE3840

</TD><TD>

3840K

</TD><TD>

80

</TD><TD>

48

</TD><TD>

2

</TD><TD>

112

</TD></TR></TABLE>





<P><B>

DESCRIPTION

</B></P>



<P>fd special files access the floppy disk drives in raw mode. The following

ioctl(2) calls are supported by fd devices:

</P>



<P>FDCLRPRM clears the media information of a drive (geometry of disk in drive).

<BR>



<P>FDSETPRM sets the media information of a drive. The media information will be lost when the media is changed.

<BR>



<P>FDDEFPRM sets the media information of a drive (geometry of disk in drive). The media information will not be lost when

the media is changed. This will disable autodetection. In order to re-enable autodetection, you have to issue an

FDCLRPRM.

<BR>



<P>FDGETDRVTYP displays the type of a drive (name parameter). For formats that work in several drive types,

FDGETDRVTYP returns a name that is appropriate for the oldest drive type that supports this format.

<BR>



<P>FDFLUSH invalidates the buffer cache for the given drive.

<BR>



<P>FDFLUSH invalidates the buffer cache for the given drive.

<BR>



<P>FDSETMAXERRS sets the error thresholds for reporting errors, aborting the operation, recalibrating, resetting, and reading

sector by sector.

<BR>



<P>FDSETMAXERRS gets the current error thresholds.

<BR>



<P>FDGETDRVTYP gets the internal name of the drive.

<BR>



<P>FDWERRORCLR clears the write error statistics.

<BR>



<P>FDWERRORGET reads the write error statistics. These include the total number of write errors, the location and disk of the

first write error, and the location and disk of the last write error. Disks are identified by a generation number that is

incremented at (almost) each disk change.

<BR>



<P>FDTWADDLE switches the drive motor off for a few microseconds. This might be needed in order to access a disk whose

sectors are too close together.

<BR>



<P>FDSETDRVPRM sets various drive parameters.

<BR>



<P>FDGETDRVPRM reads these parameters back.

<BR>



<P>FDGETDRVSTAT gets the cached drive state (disk changed, write protected et al.)

<BR>



<P>FDPOLLDRVSTAT polls the drive and return its state.

<BR>



<P>FDGETFDCSTAT gets the floppy controller state.

<BR>



<P>FDRESET resets the floppy controller under certain conditions.

<BR>



<P>FDRAWCMD sends a raw command to the floppy controller.

</P>



<P>For more precise information, consult also the

&lt;linux/fd.h&gt; and &lt;linux/fdreg.h&gt; include files, as well as the manual page

for floppy control.

</P>



<P><B>

NOTES

</B></P>



<P>The various formats allow you to read and write many types of disks. However, if a floppy is formatted with a too

small intersector gap, performance may drop, up to needing a few seconds to access an entire track. To prevent this, use

interleaved formats. It is not possible to read floppies that are formatted using GCR (group code recording), which is used by Apple

II and Macintosh computers (800K disks). Reading floppies that are hard sectored (one hole per sector, with the index

hole being a little skewed) is not supported. This used to be common with older 8-inch floppies.

</P>



<A NAME="PAGENUM-1083"><P>Page 1083</P></A>





<P><B>

FILES

</B></P>



<!-- CODE SNIP //-->

<PRE>/dev/fd*

</PRE>

<!-- END CODE SNIP //-->



<P><B>

AUTHORS

</B></P>



<P>Alain Knaff (Alain.Knaff@imag.fr), David Niemi (niemidc@clark.net), Bill Broadhurst

(bbroad@netcom.com).

</P>



<P><B>

SEE ALSO

</B></P>



<!-- CODE SNIP //-->

<PRE>

floppycontrol(1), mknod(1), chown(1), getfdprm(1),

superformat(1), mount(8), setfd-prm(8)

</PRE>

<!-- END CODE SNIP //-->



<P>Linux, 29 January 1995

</P>



<H3><A NAME="ch04_ 7">

hd

</A></H3>





<P>hd&#151;MFM/IDE hard disk device

</P>



<P><B>

DESCRIPTION

</B></P>



<P>hd* are block devices to access MFM/IDE hard disk drives in raw mode. The master drive on the primary IDE

controller (major device number 3) is hda; the slave drive is

hdb. The master drive of the second controller (major device number 22)

is hdc and the slave hdd.

</P>



<P>General IDE block device names have the form

hdX , or hdXP, where X is a letter denoting the physical drive, and

P is a number denoting the partition on that physical drive. The first form,

hdX, is used to address the whole drive. Partition numbers are assigned in the order the partitions are discovered, and only nonempty, nonextended partitions get a

number. However, partition numbers 1_4 are given to the four partitions described in the MBR (the primary partitions), regardless

of whether they are unused or extended. Thus, the first logical partition will be

hdX5. Both DOS-type partitioning and BSD-disk label partitioning are supported. You can have at most 63 partitions on an IDE disk.

</P>



<P>For example, /dev/hda refers to all of the first IDE drive in the system; and

/dev/hdb3 refers to the third DOS primary partition on the second one.

</P>



<P>They are typically created by the following:

</P>



<!-- CODE //-->

<PRE>

mknod -m 660 /dev/hda b 3 0

mknod -m 660 /dev/hda1 b 3 1

mknod -m 660 /dev/hda2 b 3 2



...

mknod -m 660 /dev/hda8 b 3 8

mknod -m 660 /dev/hdb b 3 64

mknod -m 660 /dev/hdb1 b 3 65

mknod -m 660 /dev/hdb2 b 3 66



...

mknod -m 660 /dev/hdb8 b 3 72

chown root.disk /dev/hd*

</PRE>

<!-- END CODE //-->



<P><B>

FILES

</B></P>



<!-- CODE SNIP //-->

<PRE>/dev/hd*

</PRE>

<!-- END CODE SNIP //-->



<P><B>

SEE ALSO

</B></P>



<!-- CODE SNIP //-->

<PRE>mknod(1), chown(1), mount(8), sd(4)

</PRE>

<!-- END CODE SNIP //-->



<P>Linux, 17 December 1992

</P>



<A NAME="PAGENUM-1084"><P>Page 1084</P></A>





<H3><A NAME="ch04_ 8">

ispell

</A></H3>



<P>ispell&#151;Format of ispell dictionaries and

affix files

</P>



<P><B>

DESCRIPTION

</B></P>



<P>ispell(1) requires two files to define the language that it is spell checking. The first file is a dictionary containing words

for the language, and the second is an affix file that defines he meaning of special flags in the dictionary. The two files

are combined by buildhash (see spell(1)) and written to a hash file that is not described here.

</P>



<P>A raw ispell dictionary (either the main dictionary or your own personal dictionary) contains a list of words, one per

line. Each word may optionally be followed by a slash

(/) and one or more flags, which modify the root word as explained

later. Depending on the options with which ispell was built, case may or may not be significant in either the root word or

the flags, independently. Specifically, if the compile-time option

CAPITALIZATION is defined, case is significant in the root word;

if not, case is ignored in the root word. If the compile-time option

MASKBITS is set to a value of 32, case is ignored in the

flags; otherwise, case is significant in the flags. Contact your system administrator or

ispell maintainer for more information (or use the

_vv flag to find out). The dictionary should be sorted with the

_f flag of sort(1) before the hash file is built; this

is done automatically by unchlist(1), which is the normal way of building dictionaries.

</P>



<P>If the dictionary contains words that have string characters (see the

affix file documentation, following), they must be written in the format given by the

defstringtype statement in the affix file. This will be the case for most

non-English languages. Be careful to use this format, rather than that of your favorite formatter, when adding words to a dictionary.

If you add words to your personal dictionary during an

ispell session, they will automatically be converted to the

correct format. This feature can be used to convert an entire dictionary if necessary:

</P>



<!-- CODE //-->

<PRE>

echo qqqqq &gt; dummy.dict

buildhash dummy.dict affix-file dummy.hash

awk `fprint &quot;*&quot;gENDfprint &quot;#&quot;g' old-dict-file \

| ispell -a -T old-dict-string-type \

-d ./dummy.hash -p ./new-dict-file \

&gt; /dev/null

rm dummy.*

</PRE>

<!-- END CODE //-->



<P>The case of the root word controls the case of words accepted by

ispell, as follows:

</P>



<OL>

<LI>     If the root word appears only in lowercase (for example, bob), it will be accepted in lowercase, capitalized, or all capitals.

<LI>          If the root word appears capitalized (for example, Robert), it will not be accepted in all lowercase, but will be

accepted capitalized or all in capitals.

<LI>          If the root word appears all in capitals (for example, UNIX), it will only be accepted all in capitals.

<LI>          If the root word appears with a &quot;funny&quot; capitalization (for example, ITCorp), a word will be accepted only if it

follows that capitalization, or if it appears all in capitals.

<LI>          More than one capitalization of a root word may appear in the dictionary. Flags from different capitalizations

are combined using OR.

</OL>



<P>Redundant capitalizations (for example, bob and Bob) will be combined by

buildhash and by ispell (for personal dictionaries), and can be removed from a raw dictionary by

munchlist.

</P>



<P>For example, the dictionary

</P>



<!-- CODE SNIP //-->

<PRE>

bob

Robert

UNIX

ITcorp

ITCorp

</PRE>

<!-- END CODE SNIP //-->



<P>will accept bob, Bob, BOB, Robert, ROBERT, UNIX,

ITcorp, ITCorp, and ITCORP, and will reject all others. Some of the

unacceptable forms are bOb, robert, Unix, and

ItCorp.

</P>







<P><CENTER>

<a href="1079-1081.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1085-1085.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?