The A+ Exams Guide: (Exam 220-301), (Exam 220-302) (TestTakers Guides)

 < Day Day Up > 


DOS has its own set of commands that are entered at a DOS command prompt to instruct the operating system to carry out specific instructions or tasks. DOS commands are defined as internal or external.

You should be familiar with the important DOS commands and switches displayed in Table 10.2. Practice using these DOS commands.

Table 10.2: DOS Commands and Switches

Command

Function

Switches Used

ATTRIB

Displays or sets the attributes of a file

+R/-R,+A/-A,+S/-S,+H/-H

CD

Changes to another directory

\ Takes you to the root

CD..

Back up one directory level

 

COPY

Copies the files and directories

 

XCOPY

Copies file directories and subdirectories

/H Copies hidden files

  

/S Copies subdirectories

  

/V Verifies each file copied

DISKCOPY

Copies the entire disk

 

DEL

Deletes a file

 

DELTREE

Deletes the directory, subdirectory,

and files

TREE

Displays directory and subdirectory structure

| more View one screen

DIR

Displays all files in current directory

/P Pauses each screen

  

/W Displays wide view

MEM

Displays memory used and available

/C Detail memory list

MD

Creates or makes a directory

 

MOVE

Moves a file

 

RD

Removes a directory or subdirectory

 

REN

Renames a file

 

SETVER

Updates the current DOS version table

 

SYS

Makes a drive bootable by copying the three bootable DOS disks

main system files to it; used to create

VER

Displays the version of DOS installed

 

Switches

Switches are symbols used in conjunction with DOS commands that instruct DOS to carry out specific functions, such as displaying a screen in wide view or pausing a screen after a certain number of lines have been displayed.

The most common switch is the forward slash (/). It is often used in conjunction with the DIR command. For example, if you enter “DIR /P” switch at a DOS or Windows command prompt, 23 lines will be displayed at a time. You can then press Enter for the next 23 lines to display, and so on. This lets you read what is listed one page at a time instead of watching many pages scroll by. If you enter the “DIR /W” switch, a wide view of the files in the current directory will be displayed to the screen.

A very useful switch to utilize in a DOS or Windows environment is the forward slash question mark switch (/?). When this switch is entered in combination with a DOS command, you are presented with a screen that displays all the switches that can be used with that DOS command, as well as the function of each. Figure 10.4 displays the DIR /? switch and its results at a Windows 2000 command prompt.

Figure 10.4: The /? switch results displayed at a Windows 2000 command prompt.

Wildcards

Two wildcards used in DOS and Windows allow you to find or display multiple occurrences of similar file name associations. In other words, wildcards are used to find or identify common directories and files. DOS reserves the question mark (?) and the asterisk (*) to be used as wildcards. These wildcards can also be used through a Windows GUI at the command prompt or in Windows 2000 by selecting Start > Search > For Files or Folders, and then entering the required criteria in the Search for files or folders named selection box.


 < Day Day Up > 

Категории