LESSON 3: DOS FOR BEGINNERS
DOS stands for Disk Operating System. DOS is the Operating System, on most PCs, that controls the primary input and output of your computer while you use an application program such as your word processor or database.
DOS performs 2 functions:
First, it enables the hardware devices to properly communicate with each other. It is a set of instructions so that the computer's brain understands how its arms and legs operate (keyboard, monitor, printers, etc.). We take this ability for granted. It is like starting a car - many complex systems must work in unison for it to work, yet we take it for granted that it will start.
The second function of DOS is also important. We must have a means to manage the files that we save on our Floppy Disks or Hard Drives. There are times when we wish to copy these files from one disk to another, erase them, or determine which files are on a disk. These tasks are performed often and the software required to do so is DOS.
When you access DOS, you will see the lonesome C:\> prompt on your hard drive.
This symbol signals 3 things:
1. DOS has been properly loaded into RAM
Each disk drive and hard disk has a letter associated with it. If a drive is considered the DEFAULT drive, then the computer will always assume that the information needed is in that drive, OR if something you have created is saved, it will be saved to that drive UNLESS you tell the computer otherwise.
All types of disks contain files. We use DOS as a software tool to manage these files. We not only tell the computer which file we want to erase or copy but also which drive it is currently in.
If A:\> is on the screen it is the DOS prompt and in this case the A: drive is the DEFAULT floppy drive which will be searched for information if you issue a command and ask DOS to execute it.
You can CHANGE the default drive simply. Let's try switching drives.
At C:\> try the following example: (Example) A: <press enter key>
The result on screen is now A:\>
The computer now pays attention to A: (A drive). Hopefully there is a disk in A: drive or DOS gets confused and will give you an error message.
Since you have a hard drive (which is usually the C: drive,) you can try switching back and forth between your A: drive and C: in a similar manner. Try switching around between drives, go back and forth a few times. Switching drives is a VERY IMPORTANT SKILL, since DOS pays attention to the default drive whose letter is displayed on your screen.
FILENAMES & EXTENSIONS
A filename consists of the name and its extension. Files can be typed in upper or lower case, DOS doesn't care! The file extension frequently gives a clue as to the nature of the file.
Examples of filenames. LOOK CAREFULLY AT THE THREE DIGIT EXTENSIONS:
123.EXE The program 123, an "executable" file. Think of
as a program that can be started and "run" to do something.
SUBDIRECTORIES - LITTLE BOXES IN THE DISK DRIVE
CD disks have a relatively limited capacity to store files - limited in comparison to the seemingly expansive space on a hard drive. To find a necessary file name on a CD, just use the DIR or directory command. However, on a hard disk things get a little out of hand with hundreds of files all listed on the same screen. A solution is obtained by adding subdirectories and pathnames to manage the location and organization of file storage. A path is nothing more than a "trail" or "direction post" which helps DOS find a particular file out of the hundreds which may be located on a hard drive.
This pathname is facilitated by the use of multiple directories (called subdirectories) on a single disk. In this fashion you sort files into groups in a specific place on the drive. By the way, a subdirectory is itself a small file and does occupy space on the disk.
You could compare a hard or floppy disk to a department store. The store might sell toys, books and clothes. Similar items go in the same department or area.
A disk also has the capacity for many separate areas in which to place files. DOS refers to these with a main central directory (root directory) and subdirectories branching below it. You can create a subdirectory named TEXT which contains all your word processing documents. Computer utilities could be in a subdirectory called UTIL, and so on.
- ? and * - DOS can use "wildcards" in many operations
Example: C>dir A:*.wks
Means provide a directory listing of any files on the A: drive ending in WKS and beginning with ANY characters of ANY length from 1 to eight digits. Files such as MY.WKS or NUMBERS.WKS or NAMES.WKS would fit this description.
Example: B>copy ???.dat A:
The often used *.* means ANY FILE NAME and ANY extension regardless of length.
For instance: Example: C>copy *.* A: (means copy ALL files from the existing default C: into the A: drive)
C>copy A:*.* B: (means copy ALL files from A: to B:)
INTERNAL & EXTERNAL COMMANDS
Many of the DOS commands once loaded stay inside the machine. These commands stay resident (stay put) and are called INTERNAL commands. DIR is an example of an INTERNAL COMMAND - it lives inside the computer once DOS is loaded.
EXTERNAL COMMANDS only live on disk (Hard or Floppy) and can be copied to other disks (example: FORMAT.COM). They load TEMPORARILY into the computer memory, do their job and then are gone. EXTERNAL DOS COMMANDS MUST HAVE A DOS DISK OR DIRECTORY (OR COPY) of that command in a disk directory or drive when you need them.
The following are examples of some useful DOS commands:
- DIR - (Internal) means "directory" (a list of files or programs on the disk.)You get a listing of files in the drive (hopefully a disk is in the drive.) Notice that we added /p to the end of a command.
C> Dir (List all files)
- COPY - (Internal) copies one or several files to a disk or directory. Copy can duplicate a file onto another disk or into a subdirectory (more on subdirectories later). Copy is a very flexible and powerful DOS commands. Use the copy command with the wildcards seen above for even more flexibility.
Example: B>copy zip.doc A: (copy zip.doc from B: drive to A: drive.)
Example: A>copy C:why.com B: (copy why.com from C: drive to B: drive.)
Example: C>copy C:fuss.txt B:whine.txt (copy fuss.txt from C: drive to B: drive and rename it whine.txt)
Remember, if the computer is not told differently, it will assume
A>COPY sample.wk1 B:
The "A:" in the first example is redundant.
- DATE and TIME - (Internal) A calendar and clock exist within DOS. On some computers it automatically is updated and kept current. Date and time data is important to DOS since it is attached to all files to keep track of when they were created so you can determine which file is most recent.
Example: B>time Example: A>date
- DEL or ERASE - (Internal) deletes files or groups of files.
Example: A>del whine.txt Example: B>del 784.jid
Example: A>del *.jid (notice the use of the * wildcard we mentioned earlier!)
Example: A>del old.* (notice the use of the * wildcard we mentioned earlier!)
- DISKCOPY - (External) copies entire contents of one floppy to another.
Example: A>diskcopy A: B: (copy the contents of A: floppy to B: floppy)
- CLS - (Internal) clears the screen and puts the cursor in the home (upper left) position. Useful. Try it!
- CD or CHDIR - (Internal) changes the current (active) subdirectory or directory. CD\ brings you to the root (main directory) no matter where you are.
C> CD\WINDOWS (Change to Windows directory)
- FORMAT - (External) Prepares a blank floppy to receive data. Format erases any old files on a disk - be careful! Format prepares the tracks and sectors which will receive the data. All disks must first be formatted prior to use.
Example: B>format A: (format floppy in A: drive)
Example:C>format A:/s (format floppy in A: AND add system files)
Tip:DANGER! If you enter any of these commands, your files are off
to Computer Heaven, never to be seen again.
- SCANDISK - (External) This is an advanced disk utility. It will check the disk and highlight any problem areas. It uses a Graphical User Interface.
PRACTICE: FREQUENTLY USED DOS COMMANDS
B>rd\letters\financial (removes financial subdirectory below letters
subdirectory and root directory)
Example: C>cd\data (change to subdirectory named data below the root)
A>DIR B:/P - Displays list of files one screen at a time
A>DIR B:/W - Displays list of files using the entire width of the screen
A>COPY A:filename.ext B: - To copy one file from Disk A to Disk B
A>DEL B:filename.ext - To remove the specified file from the specified drive.
A>DISKCOPY A: B: - Making an exact copy of the diskette in Drive A onto the diskette in Drive B. (Follow on-screen directions)
1. State the uses of 5 Internal commands and 5 external commands.
2. What is the difference between Internal and External commands?
3. Explain the following: Directories, Format, Rename, Path, Full pathname.
4. Give 5 specific and original examples of the use of wildcards.
5. Name the 5 most important DOS commands and state why they are important.
Jidaw Systems Limited is a premier IT Career, Training, research and
consultancy firm. For further information on our training and career
Here to Contact us.
Original content provided by Jidaw.com. Copyright © 1989-2011 Jidaw Systems Limited All rights reserved.
|HOME||ABOUT US||NIGERIA||CONTACT US||RESOURCES||TRAINING||E-LEARNING||CERTIFICATION||SITEMAP||HELP|