old-www/LDP/GNU-Linux-Tools-Summary/html/c10694.htm

430 lines
5.6 KiB
HTML

<HTML
><HEAD
><TITLE
>Working with MS-DOS files</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="GNU/Linux Command-Line Tools Summary"
HREF="book1.htm"><LINK
REL="PREVIOUS"
TITLE="Graphics tools (command line based)"
HREF="c10407.htm"><LINK
REL="NEXT"
TITLE="Scheduling Commands to run in the background"
HREF="c10866.htm"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GNU/Linux Command-Line Tools Summary</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c10407.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c10866.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="WORKING-WITH-MS-DOS"
></A
>Chapter 17. Working with MS-DOS files</H1
><P
>Use the mtools <A
NAME="AEN10697"
></A
>programs <A
NAME="AEN10699"
></A
>to work with ms-dos <A
NAME="AEN10701"
></A
>based files, execute <A
NAME="AEN10703"
></A
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>mtools</I
></SPAN
> for a full <A
NAME="AEN10706"
></A
>listing <A
NAME="AEN10708"
></A
>of available <A
NAME="AEN10710"
></A
>m* tools. There are a lot of files within the mtools <A
NAME="AEN10712"
></A
>package <A
NAME="AEN10714"
></A
>for working with ms-dos<A
NAME="AEN10716"
></A
> disks,<A
NAME="AEN10718"
></A
> also try the info <A
NAME="AEN10720"
></A
>documentation <A
NAME="AEN10722"
></A
>of mtools <A
NAME="AEN10724"
></A
>for more <A
NAME="AEN10726"
></A
>details.<A
NAME="AEN10728"
></A
></P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>The use of slashes: </B
>Note that with mtools commands you can use the slashes on the a: part either way (ie. backslash (windows-style) or forward slash (UNIX system style)).</P
></BLOCKQUOTE
></DIV
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>mformat</DT
><DD
><P
><A
NAME="AEN10738"
></A
>Formats <A
NAME="AEN10740"
></A
>an unmounted <A
NAME="AEN10742"
></A
>disk as an ms-dos <A
NAME="AEN10744"
></A
>floppy disk.<A
NAME="AEN10746"
></A
> Usage <A
NAME="AEN10748"
></A
>is similar to the ms-dos <A
NAME="AEN10750"
></A
>format <A
NAME="AEN10752"
></A
>utility,<A
NAME="AEN10754"
></A
> to format <A
NAME="AEN10756"
></A
>the first floppy<A
NAME="AEN10758"
></A
> disk <A
NAME="AEN10760"
></A
>you can type:</P
><PRE
CLASS="SCREEN"
>mformat a:</PRE
></DD
><DT
>mcopy</DT
><DD
><P
><A
NAME="AEN10767"
></A
>Copies files from an ms-dos <A
NAME="AEN10769"
></A
>disk when it's not mounted.<A
NAME="AEN10771"
></A
> Similar to the ms-dos <A
NAME="AEN10773"
></A
>copy command except it's more advanced.<A
NAME="AEN10775"
></A
> </P
><P
>Command syntax:</P
><PRE
CLASS="SCREEN"
>mcopy a:/file_or_files /destination/directory</PRE
></DD
><DT
>mmount</DT
><DD
><P
><A
NAME="AEN10783"
></A
>Mount an ms-dos <A
NAME="AEN10785"
></A
>disk, without using the normal <A
NAME="AEN10787"
></A
>UNIX system mount.</P
><P
>For example:</P
><PRE
CLASS="SCREEN"
>mmount a: /mnt/floppy</PRE
><P
>This will mount <A
NAME="AEN10792"
></A
>the floppy under /mnt/floppy (this option may or may not be necessary, it depends on your /etc/fstab setup).</P
></DD
><DT
>mbadblocks</DT
><DD
><P
><A
NAME="AEN10798"
></A
>Scans <A
NAME="AEN10800"
></A
>an ms-dos <A
NAME="AEN10802"
></A
>(fat formatted <A
NAME="AEN10804"
></A
>disk) for bad blocks,<A
NAME="AEN10806"
></A
> it marks<A
NAME="AEN10808"
></A
> any unused bad blocks <A
NAME="AEN10810"
></A
>as &ldquo;bad&rdquo; so they won't be used. </P
><P
>Example:</P
><PRE
CLASS="SCREEN"
>mbadblocks a:</PRE
></DD
><DT
>dosfsck</DT
><DD
><P
><A
NAME="AEN10818"
></A
>This program <A
NAME="AEN10820"
></A
>is used to check <A
NAME="AEN10822"
></A
>and repair <A
NAME="AEN10824"
></A
>ms-dos based filesystems.<A
NAME="AEN10826"
></A
> Use the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>-a<A
NAME="AEN10829"
></A
></I
></SPAN
> option to automatically <A
NAME="AEN10831"
></A
>repair <A
NAME="AEN10833"
></A
>the filesystem <A
NAME="AEN10835"
></A
>(ie don't ask the user questions), the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>-t<A
NAME="AEN10838"
></A
></I
></SPAN
> option <A
NAME="AEN10840"
></A
>to mark <A
NAME="AEN10842"
></A
>un-readable <A
NAME="AEN10844"
></A
>clusters <A
NAME="AEN10846"
></A
>as bad and the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>-v</I
></SPAN
> option to be more <A
NAME="AEN10849"
></A
>verbose <A
NAME="AEN10851"
></A
>(print more information).</P
><P
>Example:</P
><PRE
CLASS="SCREEN"
>dosfsck -at /dev/fd0</PRE
><P
>This would check <A
NAME="AEN10856"
></A
>your floppy disk <A
NAME="AEN10858"
></A
>for any errors <A
NAME="AEN10860"
></A
>(and bad sectors) and repair<A
NAME="AEN10862"
></A
> them automatically.<A
NAME="AEN10864"
></A
></P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c10407.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.htm"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c10866.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Graphics tools (command line based)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Scheduling Commands to run in the background</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>