Next Previous Contents

Dos and Floppies


Some general remarks

Linux understand floppies written for DOS/Windows (and some other operating systems, but I will not explain that in this manual). However, floppies are one of the most unreliable pieces of hardware, so be ready for lots of mistakes and frustration when working with them.

As a general rule, DOS commands work in Linux if you prepend an m to the command name, for example, instead of copy you can use mcopy

All the commands below work once you have put the floppy in the drive. However, if you get a message of the type permission denied, you will need to contact the system administrator for setting up your computer correctly.



Reading the contents of a floppy

To list the contents of a floppy do


   mdir A
or B if your machine has two drives. You can also list the contents of a directory in the floppy with a command like this one:

   mdir A:directory-name
You can change into a particular directory of a floppy with

   mcd A:directory-name
If you do this, all the results of floppy operations from this point onward will take place in the directory where you ahve changed to.


Writing into/from a floppy

To copy a file from the hard disk into a floppy use:


   mcopy file A:
or

   mcopy -t file A:
if your file is an ASCII (text) file. To copy a file from the floppy into the hard disk use the above command with the roles of hard disk and floppy reversed, that is

   mcopy A:file file-name
or

   mcopy -t A:file file-name
To make a directory in a floppy use:

   mmd A:directory-name



Formatting floppies

To format a floppy simply issue the command:


   mformat A:



Other stuff

To delete a file from a floppy to


   mdel A:file-name
In some machines (very few) you can operate your floppy as another Linux directory by "mounting" it. Try giving the command

   mount /dev/fd0
and then mount The last line of this command will tell you where your floppy is (usually in /floppy), if every thing went fine. Then you can use that directory (say /floppy) as any other Linux directory: copying is done with cp, deleting with rm, etc...
Next Previous Contents