.TH dosdir "" "" Command
.PC "List contents of an \*(MD directory"
\fBdosdir [\-nv] \fIdevice\fB:[\fIdir\^\fB/][\fIfile\^\fB]\fR
.PP
.HS
.SH Options
.IC \fBn\fR
List files in order of creation (newest file last) rather
than in alphabetical order.
.IC \fBv\fR
Verbose.
Describe each action as it is executed.
.HE
.II "MS-DOS^list contents of directories"
.B dosdir
lists the contents of a
.I directory
that lives on an \*(MD file system.
The \*(MD file system can reside either on a floppy disk, or on
the \*(MD segment of a hard disk on your system.
The \*(MD file system must be named using
the device that holds it,
such as floppy-disk drive
.B /dev/fha0
or hard-disk partition
.BR /dev/at0a .
You can also build a file of aliases so that
you can access the drives as
.BR a ,
.BR b ,
etc.
For details, see the Lexicon entry for
.BR doscp ,
which explains how to set up defaults for the \fBdos\fR family of commands.
.PP
.B dosdir
recognizes the following options:
.IP \fBn\fR
Newest:
List the files in the order in which they were last modified, from newest
to oldest.
By default,
.B dosdir
lists files in alphabetical order.
.IP \fBv\fR
Verbose.
Provide additional information about each action performed.
.SH Example
The following command lists the contents of
.BR mydir .
It assumes that you have defined
.B c
as a default for a device on which is set an \*(MD file system:
.DM
	dosdir c:/mydir
.DE
.SH Files
\fB/etc/default/msdos\fR \(em Setup file
.SH "See Also"
.Xr "commands, " commands, 
.Xr "dos," dos
.Xr "dosls," dosls
.Xr "ls" ls
.SH Notes
If you see the error
.DM
	dosdir: Probably not a DOS disk (media descriptor 0x00)
.DE
.PP
.B dosdir
cannot find a valid boot block on a partition.
It happens when you try to access an extended DOS
partition as though it were a primary partition.
Check the line in
.B /etc/default/msdos
to see how
.B dosdir
is accessing that partition.
.PP
For example, if are trying to access device
.B h:
and the entry for that device reads
.DM
	h=/dev/sd1a
.DE
.PP
this device may in fact be an extended partition.
It sometimes happens with removable media, such as removable
SCSI disks, have extended partitions built on them without the
operator's knowledge.
To test whether this partition is in fact an extended partition,
type the command:
.DM
	dosdir -v /dev/sd1a;1
.DE
.PP
If you then see the contents of the partition, you know that you are on
the right track.
Change the entry for device
.B h
to read
.DM
	h=/dev/sd1a;1
.DE
.PP
and all should be well.
.PP
.B dosdir
does not understand compressed \*(MD file systems created by programs such as
.B Stacker
or \*(MD 6.0
.BR dblspace .
If you are running \*(MD with file compression,
you must copy files to an uncompressed file system
(for example, to an uncompressed floppy disk or to the uncompressed
host for a compressed file system) to make them accessible to the
.BR dosdir .
