⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0332-0334.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands: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=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0329-0331.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0335-0337.html">Next</A></CENTER></P>







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





<P><B>Name Clashes</B></P>





<P>When writing a file to disk, its long name (primary name) or short name may collide with an already existing file

or directory. This may happen for all commands that create new directory entries:

mcopy, mmd, mren, mmove, mwrite, and mread.

</P>





<P>When a name clash happens, mtools asks you what it should do. It offers several choices:

</P>



<TABLE>



<TR><TD>

overwrite

</TD><TD>

Overwrites the existing file. It is not possible to overwrite a directory with a file.

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

rename

</TD><TD>

enames the newly created file.

mtools will prompt for the new filename.

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

autorename

</TD><TD>

Renames the newly created file.

mtools will chose a name by itself, without prompting.

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

skip

</TD><TD>

Gives up on this file, and moves on to the next (if any).

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



<P>To choose an option, type its first letter at the prompt. If you use a lowercase letter, the option applies for this file only;

if you use an uppercase letter, the option applies to all FILES.

</P>



<P>You may also choose OPTIONS (for all FILES) on the command line when invoking

mtools:

</P>





<TABLE>



<TR><TD>

-o

</TD><TD>

Overwrites primary names by default

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

-O

</TD><TD>

Overwrites secondary names by default

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

-r

</TD><TD>

Renames primary name by default

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

-R

</TD><TD>

Renames secondary name by default

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

-a

</TD><TD>

Autorenames primary name by default

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

-A

</TD><TD>

Autorenames secondary name by default

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

-s

</TD><TD>

Skips primary name by default

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

-S

</TD><TD>

Skips secondary name by default

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

-m

</TD><TD>

Asks user what to do with primary name

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

-M

</TD><TD>

Asks user what to do with secondary name

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



<P>By default, the user is prompted if the primary name clashes, and the secondary name is autorenamed.

</P>



<P>If a name clash occurs in a UNIX directory,

mtools only asks whether to overwrite the file or to skip it.

</P>



<P><B>Case Sensitivity of the VFAT FILESystem

</B></P>





<P>The VFAT FILESystem is able to remember the case of the filenames. However, filenames that differ only in case are

not allowed to coexist in the same directory. For example if you store a file called

LongFileName on a VFAT FILESystem, mdir will show this file as

LongFileName, and not as Longfilename. However, if you then try to add

LongFilename to the same directory, it will be refused, because case is ignored for clash checks.

</P>



<P>The VFAT FILESystem allows the storing of the case of a filename in the attribute byte, if all letters of the filename are

the same case, and if all letters of the extension are the same case too.

mtools uses this information when displaying the FILES,

and also to generate the UNIX when mcopying to a UNIX directory. This may have unexpected results when applied to

FILES written using a pre-7.0 version of DOS; indeed, these filenames map to all uppercase. This is different from the behavior

of the old version of mtools, which used to generate lowercase UNIX filenames.

</P>





<P><B>Xdf Disks (Linux Only)</B></P>



<P>Xdf is a high-capacity format supported by OS/2. It can hold 1,840KB per disc. That's not very high compared to the

best 2m FORMATS, but its main advantage is that it is fast: 600 milliseconds per track. That's faster than the good old 21

sector format, and almost as fast as the standard 18 sector format. In order to access these disks, set the

use_xdf variable for the drive. See mtools(5) for details on how to do this. Fast Xdf access is only available for kernels more recent than 1.1.34.

</P>

<P>

<P>

<P>



<CENTER>

<TABLE BGCOLOR="#FFFF99">

<TR><TD><B>

CAUTION

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

<TR><TD>

<BLOCKQUOTE>

Attention distributors: If mtools is compiled on Linux, on a kernel more recent than 1.3.34, it won't run on an

older kernel. However, if it has been compiled on an older kernel, it will still run on a newer kernel, except that Xdf access

is

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

</TABLE></CENTER>

</P>

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

<P>

<P>

<P>



<CENTER>

<TABLE BGCOLOR="#FFFF99">

<TR><TD><B>

CAUTION

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

<TR><TD>

<BLOCKQUOTE>

slower. It is recommended that distribution AUTHORs only include

mtools binaries compiled on kernels older than

1.3.34 until 2.0 comes out. When 2.0 is out,

mtools binaries compiled on newer kernels may (and should) be distributed.

mtools binaries compiled on kernels older than 1.3.34 won't run on any kernel 2.1 or later.

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

</TABLE></CENTER>

</P>

<P><B>Exit Codes</B></P>



<P>All the mtools commands return 0 on success, 1 on utter failure, or

2 on partial failure. All the mtools commands perform

a few sanity checks before going ahead, to make sure that the disk is indeed an MS-DOS disk (as opposed to, say, an ext2

or minix disk). These checks may reject partially corrupted disks, which might otherwise still be readable. To avoid

these checks, set the MTOOLS_SKIP_CHECK ENVIRONMENTal variable.

</P>



<P><B>SEE ALSO</B></P>



<!-- CODE SNIP //-->

<PRE>mattrib(1), mbadblocks(1), mcd(1), mdel(1),

mformat(1), mmove(1), mrd(1), mren(1), mtype(1),

mcopy(1), mdir(1), mlabel(1), mmd(1), mmount(1)

</PRE>

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





<P><B>BUGS</B></P>



<P>An unfortunate side effect of not guessing the proper device (when multiple disk capacities are supported) is an

occasional error message from the device driver. These can be safely ignored.

</P>



<P>The fat checking code chokes on 1.72MB disks mformatted with pre-2.0.7

mtools. Set the ENVIRONMENTal variable

MTOOLS_FAT_COMPATIBILITY to bypass the fat checking.

</P>



<P>The support for non-Linux OS variants has not been tested for a long time. It may contain BUGS, or even not work at all.

</P>



<P>Local

</P>



<H3><A NAME="ch01_ 187">

mtvtoppm

</A></H3>





<P>mtvtoppm&#151;Convert output from the MTV or PRT ray tracers into a portable pixmap

</P>



<P><B>SYNOPSIS</B></P>



<!-- CODE SNIP //-->

<PRE>mtvtoppm [mtvfile]

</PRE>

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



<P><B>DESCRIPTION</B></P>



<P>mtvtoppm reads an input file from Mark Van De Wettering's MTV ray tracer and produces a portable pixmap as output.

</P>



<P>The PRT ray tracer also produces this format.

</P>



<P><B>SEE ALSO</B></P>



<!-- CODE SNIP //-->

<PRE>ppm(5)

</PRE>

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



<P><B>AUTHOR</B></P>



<P>Copyright &quot; 1989 by Jef Poskanzer

</P>



<P>2 February 1989

</P>



<H3><A NAME="ch01_ 188">

mtype

</A></H3>



<P>mtype&#151;Display contents of an MS-DOS file

</P>



<P><B>SYNOPSIS</B></P>





<!-- CODE SNIP //-->

<PRE>mtype [ -ts ] msdosfile [ msdosFILES... ]

</PRE>

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



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



<P><B>DESCRIPTION</B></P>



<P>mtype displays the specified MS-DOS file on the screen.

</P>



<P>mtype will allow the following command-line OPTIONS:

</P>



<TABLE>



<TR><TD>

t

</TD><TD>

Text file viewing. mtype will translate incoming carriage return/line feeds to line feeds.

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

s

</TD><TD>

Strip high bit. mtype will strip the high bit from the data.

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



<P>MS-DOS subdirectory names are supported with either the

/ or \ separator. The use of the \ separator or wildcards

will require the names to be enclosed in quotes to protect them from the shell.

</P>



<P>The mcd command may be used to establish the device and the current working directory (relative to MS-DOS);

otherwise, the default is A:/.

</P>



<P>mtype returns 0 on success, 1 on utter failure, or

2 on partial failure.

</P>



<P><B>SEE ALSO</B></P>





<!-- CODE SNIP //-->

<PRE>mcd(1), mread(1)

</PRE>

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



<P><B>BUGS</B></P>



<P>Allows multiple arguments, which does not follow the MS-DOS convention.

</P>



<P>Local

</P>



<H3>

mv

</H3>



<P>mv&#151;Rename FILES

</P>



<P><B>SYNOPSIS</B></P>





<!-- CODE SNIP //-->

<PRE>mv [OPTIONS] source dest

mv [OPTIONS] source... directory

</PRE>

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





<P>OPTIONS:

</P>



<!-- CODE //-->

<PRE>[_bfiuv] [_S backup-suffix] [_V {numbered,existing,simple}] [--backup] [--force]

[--interactive] [--update] [--verbose] [--suffix=backup-suffix]

[--version-control={numbered,existing,simple}] [--help] [--version]

</PRE>

<!-- END CODE //-->



<P><B>DESCRIPTION</B></P>



<P>This manual page documents the GNU version of

mv. If the last argument names an existing directory,

mv moves each other given file into a file with the same name in that directory. Otherwise, if only two FILES are given, it moves the first onto

the second. It is an error if the last argument is not a directory and more than two FILES are given. It can move only regular

FILES across FILESystems. If a destination file is unwritable, the standard input is a

tty, and the _f or --force option is not given, mv prompts the user for whether to overwrite the file. If the response does not begin with

y or Y, the file is skipped.

</P>



<P><B>OPTIONS</B></P>





<TABLE>



<TR><TD>

_b, --backup

</TD><TD>

Make backups of FILES that are about to be removed.

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

_f, --force

</TD><TD>

Remove existing destination FILES and never prompt the user.

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

_i, --interactive

</TD><TD>

Prompt whether to overwrite each destination file that already exists. If the response

does not begin with y or Y, the file is skipped.

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

_u, --update

</TD><TD>

Do not move a nondirectory that has an existing destination with the same or

newer modification time.

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

_v, --verbose

</TD><TD>

Print the name of each file before moving it.

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

--help

</TD><TD>

Print a usage message on standard output and exit successfully.

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

--version

</TD><TD>

Print version information on standard output, then exit successfully.

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







<P><CENTER>

<a href="0329-0331.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0335-0337.html">Next</A></CENTER></P>







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

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

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