-->

Previous | Table of Contents | Next

Page 332

Name Clashes

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.

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

overwrite Overwrites the existing file. It is not possible to overwrite a directory with a file.
rename enames the newly created file. mtools will prompt for the new filename.
autorename Renames the newly created file. mtools will chose a name by itself, without prompting.
skip Gives up on this file, and moves on to the next (if any).

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.

You may also choose OPTIONS (for all FILES) on the command line when invoking mtools:

-o Overwrites primary names by default
-O Overwrites secondary names by default
-r Renames primary name by default
-R Renames secondary name by default
-a Autorenames primary name by default
-A Autorenames secondary name by default
-s Skips primary name by default
-S Skips secondary name by default
-m Asks user what to do with primary name
-M Asks user what to do with secondary name

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

If a name clash occurs in a UNIX directory, mtools only asks whether to overwrite the file or to skip it.

Case Sensitivity of the VFAT FILESystem

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.

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.

Xdf Disks (Linux Only)

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.

CAUTION
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

Page 333

CAUTION
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.

Exit Codes

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.

SEE ALSO

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)

BUGS

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.

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.

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.

Local

mtvtoppm

mtvtoppm—Convert output from the MTV or PRT ray tracers into a portable pixmap

SYNOPSIS

mtvtoppm [mtvfile]

DESCRIPTION

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

The PRT ray tracer also produces this format.

SEE ALSO

ppm(5)

AUTHOR

Copyright " 1989 by Jef Poskanzer

2 February 1989

mtype

mtype—Display contents of an MS-DOS file

SYNOPSIS

mtype [ -ts ] msdosfile [ msdosFILES... ]

Page 334

DESCRIPTION

mtype displays the specified MS-DOS file on the screen.

mtype will allow the following command-line OPTIONS:

t Text file viewing. mtype will translate incoming carriage return/line feeds to line feeds.
s Strip high bit. mtype will strip the high bit from the data.

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.

The mcd command may be used to establish the device and the current working directory (relative to MS-DOS); otherwise, the default is A:/.

mtype returns 0 on success, 1 on utter failure, or 2 on partial failure.

SEE ALSO

mcd(1), mread(1)

BUGS

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

Local

mv

mv—Rename FILES

SYNOPSIS

mv [OPTIONS] source dest

mv [OPTIONS] source... directory

OPTIONS:

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

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

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

DESCRIPTION

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.

OPTIONS

_b, --backup Make backups of FILES that are about to be removed.
_f, --force Remove existing destination FILES and never prompt the user.
_i, --interactive Prompt whether to overwrite each destination file that already exists. If the response does not begin with y or Y, the file is skipped.
_u, --update Do not move a nondirectory that has an existing destination with the same or newer modification time.
_v, --verbose Print the name of each file before moving it.
--help Print a usage message on standard output and exit successfully.
--version Print version information on standard output, then exit successfully.

Previous | Table of Contents | Next