This week`s tip is for people that wish to read or write 3-1/2" MSDOS formatted diskettes on one of the Suns (the only publicly accessible Sun that has a disk drive is gomek). First of all: how to get the diskette out, once inserted: % eject The ``%'' is used to imply that you are typing at a shell prompt. To format a diskette with a DOS filesystem use % fdformat -d Most will probably want to format for low-density diskettes (720K capacity) instead of the default 1.44 Megabyte -- use the ``ell'' option for low density: % fdformat -dl To actually get to the files we have a collection of utilities called the ``mtools'' package (``man mtools'' for a complete introduction). To list the directory: % mdir a:/ displays files in the top level directory in the disk drive (always A:). Either a ``/'' or ``\'' can be used for the filepath. To copy files, use the ``mcopy'' command, for instance % mcopy -t "a:/*.*" /tmp copies all the files from the root directory on the diskette to the Unix directory /tmp. Note the use of quotes: this inhibits the shell from expanding the ``*.*'' into a list of files present in your current working directory. The ``a:'' determines the direction of the copy -- here, from the floppy to a unix directory. If you want to convert text files from MSDOS format (where carriage return/linefeed indicates the end of line) to Unix format (where a linefeed indicates end of line) use the ``-t'' as shown in the example. You can also use the utilities ``unix2dos'' and ``dos2unix'' to convert text files from one format to the other. Some of the other available commands include the following: mcd - change MSDOS directory mdel - delete an MSDOS file mmd - make an MSDOS subdirectory mrd - remove an MSDOS subdirectory mren - rename an existing MSDOS file mtype - display contents of an MSDOS file See the man pages on any of the above for additional help. A further note: MSDOS has several methods of storing collections of files into single archives, such as ``zoo'', ``zip'', and ``arc'' formats. We have utilities on the system for manipulating these MSDOS formats: see the man pages for the following: zip - package and compress (archive) files unzip - list/test/extract from a ZIP archive file zoo - manipulate archives of files in compressed form arc - pc archive utility You probably shouldn't use these methods for storing your files: rather, use the standard Unix ``tar'', ``uuencode'', and ``compress'' utilities, subjects for a future totw. Randy Fischer Subject: DOS diskettes