FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Do you want to access DOS files with Linux? just have a look





soufiene
edit by mOrpheuS - Please use quote tags when posting copied text.

Quote:
Do you need to list the files on a DOS-formatted floppy disk while running Linux? Do you need to copy a file from a DOS disk to your Linux file system, or vice versa? You can use the MTOOLS commands to do these and lots of other DOS-like things with Linux.

The MTOOLS package is a set of Linux commands that mimic the DOS commands DIR, COPY, TYPE, DEL, RENAME, and a few others. They're called the MTOOLS because they all start with the letter m, and they work much like their DOS counterparts.

Here's a list of the MTOOLS commands and what they do:

matttrib Modify the attributes of a file.
mcd Change the current directory.
mcopy Copy a file.
mdel Delete a file.
mdir List the files in the directory.
mformat Format a disk.
mlabel Change the disk label.
mmd Make a new directory.
mrd Remove a directory.
mren Rename a file.
mtype Display the contents of a file.

Okay, pop a DOS disk in the machine and let's try some examples.

Here we see the mdir command in action, listing the files on a disk:

$ mdir A:
Volume in drive A has no label
Volume Serial Number is 1205-1049
Directory of A:\

COMMAND COM 54,645 05-31-94 6:22a
FORMAT COM 22,974 05-31-94 6:22a
SYS COM 9,432 05-31-94 6:22a
MOUSE COM 28,949 04-02-93 4:39p
EDIT COM 413 05-31-94 6:22a
FDISK EXE 29,336 01-01-97 12:39a
6 file(s) 145,749 bytes
1,311,915 bytes free

Now let's copy a file from Linux to the disk, and vice versa:

$ mcopy A:pandavu.tgz /tmp
$ mcopy /tmp/kornmeal.txt A:

The mcopy command figures out in which direction to perform the file transfer by looking for the A: in either the source or the target file name. If you have two floppy drives, you can use B: when referring to the second floppy drive.

Here's an example showing the use of the mdel command to delete a file on the disk:

$ mdel mouse.com

Note that we didn't prefix the name of the file to be deleted with A: this time. All of the MTOOLS commands (except mcopy) assume that you're working with the A drive, so you can omit the A: if you like, but I recommend that you don't, just for safety's sake.


----- Enjoy !!!! Wink Wink Wink
{name here}
With FreeBSD all I need to do is mount the NTFS partition. Simple as that. You can do the same in linux, I belive.
Code:

# mount_ntfs /dev/hd{partition number here}
Nyizsa
Yes, Linux also supports the M$ file formats - no write support fot NTFS, though. But FAT32 and FAT16 are well supported - thanks for the tip anyway...
JayBee
I thing, linux is diferent from windows and dos.
Why to use tools to come close to those systems?
Linux has many features to work in. I haven't any idea why to use this.
It is the good joke but thats all. Especially for me, because I dont have floppy Laughing
ocalhoun
I've never had any problem with linux not recognizing filesystems. (Though Microsoft is terrible at it.) It seems that this Mtools package, was simply designed to let you use dos commands in linux. I, however prefer the linux commands (that is, when there is a difference, such as dir and ls)
{name here}
ocalhoun wrote:
I've never had any problem with linux not recognizing filesystems. (Though Microsoft is terrible at it.) It seems that this Mtools package, was simply designed to let you use dos commands in linux. I, however prefer the linux commands (that is, when there is a difference, such as dir and ls)

Then again, there's bash, and that uses DOS commands.
ocalhoun
{name here} wrote:
ocalhoun wrote:
I've never had any problem with linux not recognizing filesystems. (Though Microsoft is terrible at it.) It seems that this Mtools package, was simply designed to let you use dos commands in linux. I, however prefer the linux commands (that is, when there is a difference, such as dir and ls)

Then again, there's bash, and that uses DOS commands.

True, that's how I can compare dir and ls side by side, but bash dosn't support (that I have figured out how to use) arguments for dos commands. For example 'dir /p' dosn't work.
Nyizsa
ocalhoun wrote:
True, that's how I can compare dir and ls side by side, but bash dosn't support (that I have figured out how to use) arguments for dos commands. For example 'dir /p' dosn't work.

Yes, but dir -l works, so it seems that these commands are simply aliased as their DOS equivalent.
surdy
I feel, its always better to mount your DOS / Windows drive and acess with the standard Linux commands than to use some tool like this.

I personlly won't go for such tools.
ANyways thnks for the information.
Related topics
Windows Tips&tricks!
How do you access phpmyadmin?
Can't he use those files?
Cisco 2821 port forwarding
Access or Maintain a SUB domain.
AJAX tutorial [2nd part now updated]
My Disk Server, File Server Software
Linux Emulator On A Flash Drive
Uploading flash files
Running Linux without installing
Best filemanager?
Making Application Portable
My frih fundazone.com not opening but able 2 access files
Can't access my files?
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.