Wednesday, March 23, 2011

OPERATING SYSTEM BASICS:4

Command-Line Functions


The operating system is responsible for providing the system’s user interface. All operating systems for PCs provide some type of command line user interface. The command line was the user interface for MS-DOS systems and remains the interface of choice for many Linux and UNIX users. In the PC environment, different Graphical User Interfaces (GUIs) are the interfaces of choice for end users. However, technicians routinely use the command-line environment for troubleshooting and repairing purposes.

As stated earlier, the command-line is the space immediately following the command line’s drive letter prompt on the screen. All command-line functions and actions are typed in the space immediately next to the right of the prompt. These commands are executed by pressing the Enter key on the keyboard. The command prompt for using the C: hard disk drive as the active directory is displayed in the following figure.

Command Line Window


From the command prompt, all command line functions can be entered and executed.
Application programs can also be started from this prompt. These files can be discerned by their filename extensions. Files with .COM, .EXE, or .BAT extensions can be executed directly from the prompt. The .COM and .EXE file extensions are reserved by Microsoft operating systems and can only be generated by programs that can correctly configure them. The .BAT files are simply American Standard Code for
Information Interchange (ASCII) text files that have been generated using command line functions. Since they contain operating system commands mixed with .COM and .EXE files, Microsoft operating systems can execute .BAT files from the command line.


Programs with other types of extensions must be associated with one of these three file types to be operated. The user can operate application software packages, such as graphical user interfaces, word processors, business packages, data communications packages, and user programming languages. As an example, the
core component of a word processor could be a file called WORDPRO.EXE. Document files produced by word processors are normally given filename extensions of .DOC for the document or .TXT for the text file.

In order to view one of the documents electronically, you first need to run the executable file and use its features to load up, format, and display the document.
However, a BASIC file normally has an extension of .BAS assigned to it. In order to execute a file with this extension, it is necessary to run a BASIC interpreter, such as QBASIC.EXE, and then use it to load the .BAS file and then run it.
The user can also enter operating system user commands on the command line to perform different functions. These commands can be grouped into drive-level commands, directory-level commands, and file-level commands. The format for using command-line statements in a Microsoft command-line environment is:


COMMAND (space) SOURCE location (space) DESTINATION location
This statement shows how DOS operations that involve a source and final destination,
such as moving a file from one place to another, are entered.

You can also perform single-location operations, such as formatting a diskette in a
particular disk drive. For this, the format is:
Command (space) location


You can also specify commands that occur in a default location, such as obtaining a
listing of the files on the current disk drive. The format of such a command is:
COMMAND


The performance of various commands can be modified by placing one or more
software switches at the end of the basic command. A switch is added to the
command by adding a space, a forward-slash (/), and a single letter. For example:
COMMAND (space) option /switch


Hint: Common MS-DOS command switches include /P for page, /W for wide format, and /S for system. 
Different switches are used to modify different command functions. You can obtain definitions for switches that can be added to a given command by typing “/?” after the command.


              

No comments:

Post a Comment