Goals
In this session you will:
- learn how command line and GUI interfaces differ
- learn how DOS will make you a poweruser of Wind9* and the Internet
- learn DOS filename conventions
- learn the basic layout of the various drives (A, C)
- learn how to move from drive to drive
- learn how DOS boots
- about root and sub- directories
- use
DIR to see a directory listing
- use the help switch to see help for any command
- learn command syntax
- learn about wildcards
- use
MKDIR to make new directories
- use
CD to change directories
- Use an editor to create a simple textfile
- use
ATTRIB to change file attributes
GUI v. CLI
GUI
Graphical User Interface. A graphical approach to interaction,
characterized by use of a mouse and drop-down menus.
Example: Windows.
Philosophy: choose from a pre-determined range of possibilities.
CLI (command line)
Command Line Interface, or "command line". A prompt provided for you to type input, commands, etc.
Characterized by use of keyboard and a plain monochrome display.
Philosophy: choose what commands you want to use in what order, and with what bahaviour.
DOS knowledge will help you become a poweruser
- Windows 31, 95 and 98 are graphical shells running on top of MS-DOS. Understanding what is
happening under the hood will
- DOS was heavily influenced by UNIX. The Internet runs chiefly on UNIX machines, so your understand
of DOS will greatly assist you understand the Internet. In addition, a familiarity with CLI environments
is very helpful with learning new Operating Systems (OSes) like linux.
Filenames
- All OSes have rules about how you may name your files. DOS allows you to use a 1-8 character filename, with an optional 1-3 character extension. This is called an 8+3 filename.
- No spaces are allowed. Neither are most pieces of punctuation (some of these are reserved).
- When a filename has an extension, you'll refer to it with a dot between them: myfile.ext
- use meaningful concepts to name your files: hercules.txt, bills.123, etc.
- some extensions are strong (ie, used for special purposes only). .com and .exe refer to executable files (files which can be "run"). .bat indicates a batch file, a collection of commands which you will use on the 4th day.
Your Drives
- To your OS your hard disks (usually called C) and floppy disks (A) are alike although one is many times larger (capacity-wise) than the other.
- to go to a particular drive, enter its driver letter and a colon, like C:.
Hands on: slip your floppy in the slot, and enter A: on the command line. Notice the drive light will come on.
- this will likely drop you off in the root directory, which is the topmost part of this hierarchy.
- you can make directories (technically they are subdirectories) under this root directory, or under another subdirectory. If the driver were a filing cabinet, the directories might be drawers or folders, and your files would be the individual filed items.
Moving between drives
Type the drive letter followed by a :
Ex. "C:<enter>
Notice how your prompt changes
boot time
- BIOS
- boot disk poll (usally A then C)
- OS loader
- DOS - CONFIG.SYS
- DOS - AUTOEXEC.BAT
root directory and its subdirectories
The main directory on any drive is the root directory, which is signified
with the "\" symbol right up against the drive designator (e.g. a:\ or c:\).
Usually all that's in your root dir will be system files and as many subdirectories as you require.
DIR - directory listing
Use this to see what's in the default or a specified directory.
"dir" would output contents of the current directory
"dir c:\" would output the contents of the root directory on c:
/?, the Help Switch
Every command has a help function accessible through the help switch. "command /?". If you ever forget how to use a command or you can view the help.
Command Syntax
One of the things the help switch will show you is the command's syntax, how you must structure your command.
The generic syntax looks like this "command [switches] [arguments]".
a switch is a signal to a command to change it's behavior. For example DIR's /w switch will change the output to a Wide listing. A switch usually starts out with a "/" or a "-". all the command's switches will be listed in its help screen.
an argument is usually information about your system that you want to pass to the command so it knows what to work on. Int he example "dir *.bat" the *.bat part is the argument.
Wildcards!
Wildcards are symbolic characters that represent one or more regular characters.
* = any number of any characters. A common usage is *.txt to represent "all the files that end with .txt"
? = a single character. Much less frequently used than *.
MKDIR (MD) to make a directory
Use MD to make a new directory. Same rules as filenames!
CD to change directories
EDIT to edit textfiles
"edit [filename]"
ATTRIB
ATTRIB is used to alter the Read-only, Archive, System, and Hidden attributes.
Typical usage: "attrib +r myfile.txt"
http://www.mousetrap.net/syllabus/dos/day1.html
$Id: day1.orb,v 1.4 2001/10/30 03:44:34 mouse Exp $
Remember, your login is based on your machine's hostname, not on any other number.
~/[initials] refers to the subdirectory under your homedir, named after your initials. Everything except for .dotfiles will be stored in your ~/[initials] directory.