DOS help file

DOS is similar to a Linux command prompt, but different.

Here are what some DOS prompts look like:

C:\>
C:\WINDOWS>
H:\robotics>

The letters before the ":" are drive letters. A: and B: are floppy drives, C: is usually the hard drive, and D:, E:, and F: are often CD drives, Zip drives, etc. Anything past G: is probably a network drive. At Carleton, H: is your home directory. At the prompt, after the drive letter, you see the directory that you are in.

Navigating the file system in DOS is similar to Linux. To change drives, you will need to type in the drive letter followed by a colon (:). To change directories, you simply do it in the same way as Linux, except use a backslash \ instead of a forward slash /.
For example, if I changed drives to H: and then went into a directory called robotics, my screen would look like this:

C:\WINDOWS>H:
H:\>cd robotics
H:\robotics>

Note the lack of case sensitivity in DOS.

The built-in command history in DOS is a little strange, and works differently than Linux. But if you hit F7, you'll see a list of previous commands. Use the cursor keys to pick the one you want. You can use the up and down arrows at the command prompt, but it takes a little getting used to.

To list files in DOS, use the command "dir". You can also try "dir /w" to give you ls-like output.

Here's a list of some other Linux commands and their DOS equivalents:

Linux DOS
cp picture.jpg ./stuff/mypics/ copy picture.jpg .\stuff\mypics
mv thing.cpp /tmp/ move thing.cpp c:\temp
mv oldname.tff newname.tff ren oldname.tff newname.tff
rm badfile.txt del badfile.txt
rm -r baddir deltree baddir
mkdir newdir md newdir
cat textfile.txt type textfile.txt

Written by Andy Exley.
Edited by Dave Musicant.