Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter 17. Working with MS-DOS files

Use the mtools programs to work with MS-DOS based files, execute mtools for a full listing of available m* tools. There are a lot of files within the mtools package for working with MS-DOS disks, also try the info documentation of mtools for more details.

Note The use of slashes
 

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

mformat Formats an unmounted disk as an ms-dos floppy disk. Usage is similar to the ms-dos format utility, to format the first floppy disk you can type:

mformat a:

mcopy Copies files from an ms-dos disk when it's not mounted. Similar to the ms-dos copy command except it's more advanced.

Command syntax:

mcopy a:/file_or_files /destination/directory

mmount Mount an ms-dos disk, without using the normal UNIX system mount.

For example:

mmount a: /mnt/floppy

This will mount the floppy under /mnt/floppy (this option may or may not be necessary, it depends on your /etc/fstab setup).

mbadblocks Scans an ms-dos (fat formatted disk) for bad blocks, it marks any unused bad blocks as "bad" so they won't be used.

Example:

mbadblocks a:

dosfsck This program is used to check and repair ms-dos based filesystems. Use the -a option to automatically repair the filesystem (ie don't ask the user questions), the -t option to mark un-readable clusters as bad and the -v option to be more verbose (print more information).

Example:

dosfsck -at /dev/fd0

This would check your floppy disk for any errors (and bad sectors) and repair them automatically.

 
 
  Published under the terms of the GNU General Public License Design by Interspire