The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

Fundamentals of computers and information technology

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by prem sahyog, 2020-09-21 10:16:33

BCA - FCIT - Sem I

Fundamentals of computers and information technology

SUMMARY Applicationsof Computers
and Information Technology
 E-commerce or electronic commerce is the buying or selling of products and
services on the Internet. NOTES

 Marketing is a business field that is based on promoting a company or its
product.

 Manufacturing companies focus primarily on electronic networking in the offices
and their own shipping program.

 Project Management is the discipline of organising and managing resources in
such a way that the project is completed within defined scope, quality, time and
cost constraints.

 The first challenge of project management is to ensure that a project is delivered
within defined constraints.

 PERT stands for Program Evaluation and Review Technique.
 PERT is basically a method to analyse the tasks involved in completing a given

project, especially the time needed to complete each task and identifying the
minimum time needed to complete the total project.
 A Gantt chart is a popular type of a bar chart that illustrates a project schedule.
 A Run chart is a graph that displays observed data in a time sequence.
 Microsoft Project is a project management software program that is designed to
assist project managers in developing plans, assigning resources to tasks, tracking
progress, managing budgets and analyzing workloads.
 The major activities in materials management include materials planning, re-
quirement determination and inventory management.
 Accounting is the backbone of business.
 Payroll encompasses every employee of a company who receives a regular wage
or other compensation.
 Banks were among the first large organizations to invest heavily in computing
and today are almost totally dependent on the computer.

ANSWER OF THE CHECK YOUR PROGRESS : 339

1. E-commerce or electronic commerce is the buying and selling of products and
services on the Internet, and it seems to be the wave of the future.

2. The Program Evaluation and Review Technique commonly abbreviated PERT
isamodel for project management invented by Booz Allen Hamilton, Inc. under
contract to the United StatesDepartment of Defense’sUSNavy Special Projects
Office in 1958 aspart of the Polarismobile submarine-launched ballistic missile
project. PERT is basically a method to analyze the tasks involved in completing
a given project, especially the time needed to complete each task, and iden-
tifying the minimum time needed to complete the total project.

3. The term ‘payroll’encompasses every employee of a company who receives a
regular wage or other compensation. Some employees may be paid a steady
salary while othersare paid for hoursworked or the number of itemsproduced.
All of these different payment methodsare calculated by a payroll specialist and
the appropriate paychecks are issued.

4. Requirements Determination–For the purpose of determining requirements,

Fundamentals of materials are usually classified into the following two categories:
Computers & (a) Direct materials
Information Technology (b) Indirect materials
5. At the inventory management stage, computers are used to control the level
NOTES of inventoriesand to provide materials at the right time. Computerscan handle
variousdata such asprice, lead time, cost of ordering, cost of carrying, historical
data on delivery performance and so on very easily.

EXERCISE

1. Explain the role of computers in business.
2. What do you mean by E-commerce ? Explain it.
3. Write an account of role of computers in stock market.
4. Discuss project management. How do computers help in project management ?
5. What are the chief activities in project management ?
6. Write an elaborate note on computer aided project management.
7. Write about the role of computers in Banking.
8. Write short notes on the following -

(a) PERT
(b) GANTT
(c) Microsoft Project
(d) Material Management
9. How is e-mail useful in commerce ?
10. What is the role of a computer in marketing ?
11. What is the role of computer in manufacturing ?
12. What are constraints in Project Management ?
13. What is RUN chart ?
14. Discuss material management in detail.
15. What is Auditing ?
16. What is the role of Information system in Auditing ?
17. What is Pay-Roll ?
18. How useful is computer in e-governance and Common Public Services ? Explain.

340

11 Operating System Operating System
NOTES
The Chapter Covers :

 Introduction
 Operating System
 Why an Operating System
 Functions of Operating System
 The Booting Process
 Types of Reboot
 Booting From Different Operating System
 Types of Operating System
 Some Prominent Operating Systems
 Summary
 Exercise

INTRODUCTION

Operating system, as stated in the last chapter, is a system software. There are a number
of operating systems. Single, Multi-programming, Multi-tasking are a few terms very much
familiar with the operating system. This chapter serves you information on basics of
operating systems and how to work on some prominent operating systems.

185

Fundamentalsof USES OF OPERATING SYSTEM
Computers &
Information Technology Operating system is the first software that loads after the computer starts. It means it is
a mandatory software for booting your computer system. It is not only mandatory for
NOTES booting computer systemm but is also essential for running other application softwares and
utility softwares. In the next section you will know about it after knowing functions of
186 operating system.

WHY AN OPERATING SYSTEM ?

Operating system is a mysterious power which controls all hardware and software on our
computer. It works as a mediator between hardware and software. Just because of the
operating system, the programmers don't need to know the complexities of hardware.
Programs communicate with hardware through operating system.
Your computer has many resources such as memory, hard disk, CPU, keyboard, Network
co-ordination etc. The most important objectives of operative system is to organise these
resources. An operating system ensures that all applications get proper hardware resources
as required and the applications get enough CPU time to get their commands processed
and they get enough memory to store data. In addition, it also ensures that there is
necessary communication between software and hardware.
An operating system also provides user interface which helps the user to give commands
to the operating system or run the application of their choice. Earlier, operating system
used command line interface where the users typed command to get the task performed
in computer system. Today the operating system provide us Graphical User Interface,
where, instead of typing the commands, they are clicked and double click to get them
implemented. Today, there are many operating system and all have same fundamentals but
their functional methods are different. Their functional methods depend upon how they
are designed.

FUNCTIONS OF OPERATING SYSTEM

As you already know that operating system is a mandatory program to start a computer
system. Moreover, it controls all hardware resources of a computer system. It is like the
rein in a rider’s hands that controls a horse. However, some of the very important functions
are being described ahead :

Process Management

Every program running on a computer, be it background service or application, is a process.
As long as the von Neumann architecture was used to build computers, only one process
per CPU could be run at a time. Older microcomputer OS, such as MS-DOS, did not
attempt to bypass this limit, with the exception of interrupt processing, and only one
process could be run under them. Mainframe operating systems have multitasking capa-
bilities since the early 1960s. Modern operating systems enable concurrent execution of
many processes at once through multitasking even with one CPU. Process management
is an operating system’s way of dealing with running multiple processes. Since most
computers contain one processor with one core, multitasking is done by simply switching
processes quickly. Depending on the operating system, as more processes run, either each
time slice will become smaller or there will be a longer delay before each process is given
a chance to run. Process management involves computing and distributing CPU time as
well as other resources. Most operating systems allow a process to be assigned a priority
which affects its allocation of CPU time. Interactive operating systems also employ some
level of feedback in which the task, with which the user is working, receives higher
priority. Interrupt driven processes will normally run at a very high priority. In many systems
there is a background process, such as the System Idle Process in Windows, which will
run when no other process is waiting for the CPU.

Operating System
NOTES

Fig. 11.1 : Functions of Operating System

Memory Management

Current computer architectures arrange the computer’s memory in a hierarchical manner,
starting from the fastest registers, CPU cache, random access memory and disk storage.
An operating system’s memory manager coordinates the use of these various types of
memory by tracking which one is available, which is to be allocated or deallocated and
how to move data between them. This activity, usually referred to as virtual memory
management, increases the amount of memory available for each process by making the
disk storage seem like main memory. There is a speed penalty associated with using disks
or other slower storage as memory. If running processes require significantly more RAM
than is available, the system may start thrashing. This can happen either because one
process requires a large amount of RAM or because two or more processes compete for
a larger amount of memory than is available. This leads to constant transfer of each
process’s data to slower storage.
Another important part of memory management is managing virtual addresses. If multiple
processes are in memory at once, they must be prevented from interfering with each
other’s memory (unless there is an explicit request to utilise shared memory). This is
achieved by having separate address spaces. Each process feels as if the whole virtual
address space, typically from address 0 up to the maximum size of virtual memory, as
uniquely assigned to it. The operating system maintains a page table that matches virtual
addresses to physical addresses. These memory allocations are tracked so that when a
process terminates, all the memory used by that process can be made available for other
processes.
The operating system can also write inactive memory pages to secondary storage. This
process is called “paging” or “swapping” – the terminology varies accarding to the oper-
ating systems.

Disk and File Systems

All operating systems include support for a variety of file systems. Modern file systems
comprise of a hierarchy of directories. While the idea is conceptually similar across all
general-purpose file systems, some differences in implementation exist. Two noticeable
examples of this are the character used to separate directories, and case sensitivity.

187

Fundamentalsof Networking
Computers &
Information Technology Most of the modern operating systems are capable of using the TCP/IP networking pro-
tocols. This means that one system can appear on a network of the other and share
NOTES resources such as files, printers, and scanners using either wired or wireless connections.

188 Security Management

Typically an operating system offers (hosts) various services to other network computers
and users. These services are usually provided through ports or numbered access points
beyond the operating systems network address. Typically services include offerings such as
file sharing, print services, email, web sites, and file transfer protocols (FTP).
At the front line of security are hardware devices known as firewalls. At the operating
system level, there are a number of software firewalls available. Most modern operating
systems include a software firewall, which is enabled by default. A software firewall can
be configured to allow or deny network traffic to or from a service or application running
on the operating system. Therefore, one can install and be running an insecure service,
such as Telnet or FTP, and not have to be threatened by a security breach because the
firewall would deny all traffic trying to connect to the service on that port.

Graphical user interfaces

Today, most modern operating systems contain Graphical User Interfaces (GUIs, pro-
nounced goo-eez). A few older operating systems tightly integrated the GUI to the ker-
nel— for example, the original implementations of Microsoft Windows and Mac OS. Most
modern operating systems are modular, separating the graphics subsystem from the kernel
(as is now done in Linux, Mac OS X, and to a limited extent in Windows).
Many operating systems allow the user to install or create any user interface they desire.
The X Window System in conjunction with GNOME or KDE is a commonly found setup
on most Unix and Unix derivative (BSD, Linux, Minix) systems.
Graphical user interfaces tend to evolve over time. For example, Windows has modified
its user interface almost every time a new major version of Windows is released.

Device drivers

A device driver is a specific type of computer software developed to allow interaction with
hardware devices. Typically this constitutes an interface for communicating with the device,
through the specific computer bus or communications subsystem that the hardware is
connected to, providing commands to and/or receiving data from the device, and on the
other end, the requisite interfaces to the operating system and software applications. It is
a specialized hardware-dependent computer program which is also operating system spe-
cific that enables another program, typically an operating system or applications software
package or computer program running under the operating system kernel, to interact
transparently with a hardware device, and usually provides the requisite interrupt handling
necessary for any necessary asynchronous time-dependent hardware interfacing needs.

THE BOOTING PROCESS

Booting (booting up) is a bootstrapping process that starts operating systems when the user
turns on a computer system. A boot sequence is the set of operations the computer
performs when it is switched on to load an operating system.
Most computer systems can only execute code found in the memory (ROM or RAM).
Modern operating systems are stored on hard disks, or occasionally on LiveCDs, USB flash
drives, or other non-volatile storage devices. When a computer is first powered on, it
doesn't have an operating system in memory. The computer's hardware alone cannot

perform complex actions such as loading a program from disk, so an apparent paradox Operating System
exists: to load the operating system into memory, one appears to need to have an NOTES
operating system already loaded.
The solution is to use a special small program, called a bootstrap loader, bootstrap or boot
loader. This program's only job is to load other software for the operating system to start.
Often, multiple-stage boot loaders are used, in which several small programs of increasing
complexity summon each other, until the last of them loads the operating system.
In modern computers the bootstrapping process begins with the CPU executing software
contained in ROM (for example, the BIOS of an IBM PC) at a predefined address (the
CPU is designed to execute this software after reset without outside help). This software
contains rudimentary functionality to search for devices eligible to participate in booting,
and load a small program from a special section (most commonly the boot sector) of the
most promising device. It is usually possible to configure the BIOS so that only a certain
device can be booted from and/or to give priority to some devices over others (a CD or
DVD drive is usually given priority over a hard disk, for instance).

Fig. 11.2 : BIOS Setup 189

The boot process is considered complete when the computer is ready to interact with the
user or the operating system is capable of running ordinary applications. Typical modern
PCs boot in about a minute (of which about 15 seconds are taken by a Power-on self test
(POST) and the preliminary boot loaders, and the rest by loading the operating system),
while large servers may take several minutes to boot and to start all services. To ensure
high availability, they bring up some services before others.
Most embedded systems must boot immediately. For example, waiting a minute for a
digital television to come up is not acceptable. Therefore they have their complete
operating system in ROM or flash memory, so it can be executed directly.

TYPES OF REBOOT

Usually computer starts with the instructions as above. However, at times you may find
that your computer starts randomly or sometimes your computer hangs and you need to
restart it deliberately. There are two ways to rebooting called cold and warm reboot.

Fundamentalsof Cold Reboot
Computers &
Information Technology A cold reboot (also known as a hard reboot, cold boot or cold start) is when power to a
computer is cycled (turned off and then on) or a special reset signal to the processor is
NOTES triggered. This restarts the computer without performing any shut-down procedure. It may
be caused by power failure, be done by accident, or be done deliberately.

Warm Reboot

A warm reboot (also known as a soft reboot) is restarting a computer under software
control, without removing power or (directly) triggering a reset line. It usually, though not
always, refers to an orderly shutdown and restarting of the machine.
The Ctrl-Alt-Del key combination is designed to allow a warm reboot for a quicker and
more convenient restart than powering the computer completely down.

Dual Booting

Now there are a number of operating systems and most modern PCs offer the users to
work on two operating systems on a single system. For instance, you can install both the
Windows and Linux on your PC and can work simultaneously. When the computer starts,
it shows you a screen of choices to start with operating system you need at that point of
time. However, there is one primary (that is set default during installation) operating system
that you are not required to choose if you want it to be loaded. If automatically starts after
a few seconds.

BOOTING FROM DIFFERENT OPERATING SYSTEM

In the earlier days, when only DOS used to be on your computer, the booting process
was simple. Nowadays, you have more than one operating systems loaded on your
computer. For instance, if you have Microsoft Windows installed on your system, actually
there are two operating systems installed. Microsoft Windows is the primary operating
system and DOS is like its textual interface, though it is a part of Windows Operating
System, and hardly anybody uses this now. Likewise, if you have Windows and Linux
installed together on your computer system, then there are two full fledged operating
systems installed on your system. While installing, you set one as primary and when you
start you are asked to choose the operating system. You want to boot your computer
system with full stop. If not selected, Primary operating system starts automatically after
190 a few seconds.

The MS-DOS Boot Process Operating System
NOTES
Once the BIOS has completed its testing and system configuration, it begins the process
of loading the operating system. The BIOS accomplishes this by searching the installed 191
drives for a Master Boot Record in which is contained a boot code. Once found, the boot
code is executed and the system is booted into the operating system. When looking for
this Master Boot Record, the BIOS will search for boot devices (drives) in the order
specified in the BIOS configuration settings controlling this aspect of the boot sequence.
If it cannot find a boot device it will terminate with an error.
If the operating system is MS-DOS, or any variant of Windows other than Windows NT
or Windows 2000, that starts out by the same booting process as that of DOS, then a
specific operating system load sequence commences, which is referred to as the DOS
Boot Process. If you are booting into Windows, additional steps are performed after the
underlying MS-DOS operating system has loaded.
The steps below take you through the boot process from the hard disk. If you were to
boot from a floppy disk, the steps would only differ slightly in the first few steps, as the
floppy disk structures are slightly different. Floppies cannot be partitioned, and hence have
no master boot record or partitions. This means that the master boot record issues are
skipped.
 The BIOS, having completed its test and setup functions, loads the boot code found

in the Master Boot Record (MBR) and then transfers control of the system to it. At
that point, the master boot record code is executed. If the boot device is a floppy
disk, the process skips to step 7 below.
 The next step in the process is the master boot code examining the master partition
table. First it must determine if there is an extended DOS partition, then it must
determine if there is a bootable partition specified in the partition table.
 If the master boot code locates an extended partition on the disk, it loads the
extended partition table that describes the first logical volume in the extended par-
tition. This extended partition table is examined to see if it points to another extended
partition table. If it does, this second table is examined for information about the
second logical volume in the extended partition. Logical volumes in the extended
partition have their extended partition table chained together one to the next. This
process continues until all of the extended partitions have been loaded and recognized
by the system.
 Once the extended partition information (if any) has been loaded, the boot code
attempts to start the primary partition that is marked active, referred to as the boot
partition. If no boot partitions are marked active, then the boot process will terminate
with an error. The error message is often the same as that which occurs if the BIOS
could not locate a boot device, generally shown on screen as “No boot device”, but
also can show up as “NO ROM BASIC - SYSTEM HALTED”. If there is a primary
partition marked active and there is an installed operating system, the boot code will
boot it.
 At this stage, the master or volume boot sector is loaded into memory and tested,
and the boot code that it contains is given control of the remainder of the boot
process.
 The boot code examines the disk structures to ensure that everything is correct.
If not, the boot process will end in an error here.
 During the next step, the boot code searches the root directory of the device being
booted for the operating system files that contain the operating system. For MS-DOS,
these are the files “IO.SYS”, “MSDOS.SYS” and “COMMAND.COM”.
 If no operating system files are found, the boot program will display an error
message similar to “Non-system disk or disk error - Replace and press any key

Fundamentalsof when ready”. Keep in mind that this message does not means, that the system
Computers & was never booted. It means that the BIOS examined the floppy disk, for example,
Information Technology and just rejected it because it couldn’t boot an operating system. The volume boot
code was indeed loaded and executed, as that is what posts the message, when
NOTES it can’t find the operating system files.
 In the final stages of the boot process, presuming that the operating system files
192 are found, the boot program will load those operating system files into memory
and transfer control to them. In MS-DOS, the first is IO.SYS and its code is
executed. IO.SYS will then execute MSDOS.SYS. Then the more complete oper-
ating system code loads and initializes the rest of the operating system structures
beginning with the command interpreter COMMAND.COM and then the execu-
tion of the CONFIG.SYS and AUTOEXEC.BAT files. At this point, the operating
system code itself has control of the computer.
If any of the Windows 95/98/ME versions were being started, the above would
only be the beginning of the startup process. When MS-DOS starts in anticipation
of loading these Windows versions, there are many more routines that are loaded
and executed as part of the boot process, which includes tasks such as reading the
system registry, initializing hardware devices and starting the graphical user inter-
face or operating system shell. We hope this has given you a better understanding
of what occurs during the boot or startup process of your computer.
Prior to understanding this process, we must know that booting sequence might vary
from version to version of Windows. For the convenience of the students, booting
sequence of two versions namely Windows 98 and Windows XP are mentioned here.

The Windows 98 Boot Process

 When you boot the machine, POST (Power-On Self Test) occurs just as it does for
BIOS (Basic Input/Output System) that is not Plug and Play.

 The Plug and Play(PnP) BIOS begins by looking at the hardware devices on the
system and figuring out which ones are PnP compliant. The BIOS first enables the
devices that are not Plug and Play, and then tries to make the PnP devices use
the leftover resources.

 The Basic Input/Output System looks for devices containing the Operating System
(OS) and loads Windows 98, making information about the current allocation of
resources available to the OS.

 Just as with DOS, the Master Boot Record (MBR) executes the boot record on the
hard drive, which looks for the initial hidden files of Windows 98, called IO.SYS.

 Again, just as with DOS, IO.SYS loads. If fact, IO.SYS is really a small core DOS
module. IO.SYS looks for CONFIG.SYS file, and, if found, the CONFIG.SYS file ex-
ecutes. The CONFIG.SYS file is not required for Windows 98. Many of its functions
have been eliminated and incorporated into Windows 98. but you can use the
CONFIG.SYS file to load device drivers, if you want. However, the driver loaded in
CONFIG.SYS will be a 16 bit driver and it will be slower that the 32 bit drivers that
Windows 98 uses.

 After CONFIG.SYS is complete, IO.SYS searches for MSDOS.SYS. The role of
MSDOS.SYS differs greatly in Windows 98 from that in DOS. In Windows 98,
MSDOS.SYS is a hidden file with settings used to customize the boot process.

 The functions of the first few entries in MSDOS.SYS look like the following:
 WinDir= (Location of the Windows 9x directory)
 WinBootDir= (Location of the Windows 9x startup files)

 HostWinBootDrv= (Drive that is the Windows boot drive) Operating System
NOTES
 BootGUI= (BootGUI= 1, automatic graphical startup into Windows 9x is en-
abled. BootGUI= 0, the system boots to a command prompt) Check Your Progress:
1. What ar e funct i ons of
 Next, COMMAND.COM loads just as with DOS. COMMAND.COM is used to
provide a command interface for users and to execute an AUTOEXEC.BAT file, if operatingsysem ?
it is present. 2. DefineBootingProcess.
3. What iscoldreboot ?
 If AUTOEXEC.BAT is found, it now executes. 4. What do you know about
 The heart of Windows 98 now loads, providing a desktop from which you can
dual booting?
execute application software. 193

The Windows XP Boot Process

As with other Windows Operating Systems, when you turn on your PC, it goes through
an elaborate boot up process. It begins when the computer performs the POST (power-
on self test), followed by the POST for each adapter card that has a BIOS, for example,
your video card. The BIOS then reads the MBR (Master Boot Record) which is in the
first sector of the first hard disk and transfers control to the code in the MBR which
is created by the XP Setup. This is where Windows takes over the startup process. After
that the following sequence happens-
 The MBR reads the boot sector which is the first sector of the active partition.This

sector contains the code that starts ntldr which is the boot strap loader for
Windows XP. The first role of ntldr is to allow full memory addressing, start the
file system, read boot.ini and put up the boot menu. It is noteworthy that ntldr
must be located in root folder of the active partition along with ntdetect.com,
boot.ini, bootsect.dos (for dual booting) and ntbootdd.sys (needed with some
SCSI adapters).
 Selecting XP from the boot menu causes ntldr to run ntdetect.com to get infor-
mation about installed hardware. ntldr then uses the ARC path specified in the
boot.ini to find the boot partition. The one where Windows XP is installed. It might
look like this:
 default= multi (0)disk (0)partiton (2) WINDOWS
 [operating systems]
 multi(0)disk(0)partiton(2)WINDOWS= ”Microsoft Windows XP Home” /fastdetect
Ntldr, then, loads the two files that make up the core of XP: ntoskrnl.exe and
hal.dll. These files must be located in the %SystemRoot%System32 folder.
 Ntldr reads the registry files, selects a hardware profile, control set and loads
device drivers, in that order.
 Then, ntoskrnl.exe takes over and starts Winlogon.exe which starts Lsass.exe (Local
Security Administration), this is the program that displays the Welcome screen (If
Professional Edition-the Windows Log On dialog box), and allows the user to log
on with his/her user name and password.

The Linux Boot Process

In Linux, the flow of control during a boot is from BIOS, to boot loader, to kernel.
The kernel then starts the scheduler (to allow multi-tasking) and runs init (which sets
up the user environment and allows user interaction and login), at which point the
kernel goes idle unless called externally.

 The BIOS performs platform (rather than OS) specific startup tasks.
 The BIOS loads and executes the partition boot code from the designated boot

device, which contains phase 1 of a Linux boot loader. Phase 1 loads phase
2 (the bulk of the boot loader code). Some loaders may use an intermediate
stage to achieve this (known as phase 1.5) since modern large disks may not
be fully readable without further code.
 The boot loader often presents the user with a menu of possible boot options.

Fundamentalsof It then loads the kernel, which decompresses into memory, and sets up system
Computers & functions such as essential hardware and memory paging, before calling
Information Technology start_kernel().
 start_kernel() then performs the majority of system setup (interrupts, the rest
NOTES of memory management, device initialization, drivers, etc) before spawning
separately, the idle process and scheduler, and the init process (which is
194 executed in user space).
 The scheduler effectively takes control of the system management, as the
kernel goes dormant (idle).
 The init process executes scripts as needed that set up all non-kernel services
and structures in order to allow a user environment to be created, and then
presents the user with a login screen.
On shutdown, init is called to close down all user space functionality in a controlled
manner, again via scripted directions, following which init terminates and the Kernel
executes its own shutdown.

TYPES OF OPERATING SYSTEM

An Operating System has following types :
 Single User system
 Multi Programming
 Multi Processing
 Batch Processing

Single User system

A Single User Operating System is that which executes one program at a time. Earlier,
most Operating Systems were Single User and even in almost all the modern micro-
computers are also single User System.
The problem with this system is that it is not possible to activate more than one program
at a time. It's why the programs are arranged in a line in this system.
A computer system doesn't accept a program until it recognises it. For it, information
must be attached so that the program can be identified. Other peripheral devices too
demand these pieces of information for executing the programs. All these commands
are written in a Special Job Control Language (SJCL) which the Operating System
comprehends.
Single user operating system are infact, of two types. First, single user single tasking
operating system, which allows only one user and one program at a time to be
implemented. Second, Single user multitasking operating system, which allows one user
to run many programs at a time. MS-DOS was a single user single tasking system, while
windows operating system is a single user multitasking operating system.

Multi Programming

Operating System is a set of special programs which operates the computer and
transfers an application from one program to another. The computer, with the help of
Operating System is able to keep an eye on its own operations and allocates work
automatically to other application programs. It makes all the program instructions
comprehensible to the machine. Besides conducting and controlling all the operations
of the computer, transfers the data input by the users and the results output from one
device to another.

Now-a-days so many Operating Systems give the facility of performing several tasks at Operating System
a time. This is called Multi Programming. In other words the execution of two or more NOTES
than two programs by one computer at a time is called Multi Programming. In some
of the Multi Programming systems, only certain operations are executed, which is called
Multi Programming with Fixed Task and where the number of tasks is not fixed, it is
called Multi Programming with Variable Task.
On this operating system, for every user, there is a user enviornment called user
session. Applications of every user are executed within their user sessions which are
different from other user sessions. In Multi user/Multitasking operating systems all or
most of the computing is done on the server enviornment. The examples are Unix,
Linux and Mainframe operating systems such as MVS.

Multi Processing

The use of the word Multi Processing is to clarify the processing view where two or
more processors are linked to each other. In such systems the commands of different
and independent programs are controlled by a single processor at a time or the
execution of different commands which have been received from a single program is
done one after the other. This task belongs to Operating System itself that it may
maintain a harmony amidst Input, Output and Processing capacities. Multiprocessing
approach has been clarified with the help of the Figure 11.3.
Thus we can say that Multiprocessing is used in two computers attached to each-other
which have two or more than two CPUs and which have the capacity to execute different
programs at a time.

Fig. 11.3 : Multiprocessing

Multiprocessing increases the working capacity of a computer. This technique helps Parallel
Processing and in this technique, the task can be performed on one CPU if the other is
out of order.

Batch Processing

This is a old method which can execute various programs and is used to execute the tasks
on various Data Processing centres. This technique of Operating System is based on
Automatic Job Transfer principle. This principle is provided by most operating systems.
In such operating systems every user prepares his program offline and submits it on
Data Processing Centre when completed. And the computer operator collects all such
programs which are punched on one card. When the operator collects the batch of
programs, he loads it in the computer and then executes them one by one. At the
end, he gets the printed output of those tasks and passes them to respective users.

195

Fundamentalsof Batch Processing is also called Serial, Sequential, Offline and Stacked Job Processing.
Computers & When a computer is used for such technique, no interference of operators is needed
Information Technology to apply the input data. This task is performed automatically. Here, various tasks are
performed one by one, at a time. But, during the execution of program no interference
NOTES of operators is required.

Real Time Operating System

Real Time operating systems are very fast and comparatively smaller operating systems.
Such operating systems are often embedded and are designed to perform only one
task. They are generally used in medical test devices. Life support systems, Scientific
devices, Industrial Robots and Mobile Phones.
Real Time operating system is designed for Real Time Computing. Real Time Computing
refers to doing computing within the fixed time. It can be both Single and Multitasking.
The Applications running on Real Operating are to finish the task in a few mili sceconds
(thousandth part of a second) or a micro second (the millionth part of a second).

SOME PROMINENT OPERATING SYSTEMS

Several types of operating systems are in use in the market. DOS, Windows, Linux,
Unix, Mac operating system etc. and each has different versions. Some have been
described below :

DOS

MS-DOS is an acronym for Microsoft Disk Operating System. This is the most popular
operating system of this sort, used in microsoft computers.
In 1984, intel 80286 based micro computer was developed, only then MS-DOS 3.0
and MS-DOS 4.0 versions were developed. This operating system of Microsoft is called
DOS as it performs input/output functions related with disk. The next chapter deals
with DOS in detail.

Fig. 11.4 : DOS Screen

WINDOWS

MS-DOS was an operating system which had a textual user interface. In this operating
system, with a view to end the inconvenience of typing the commands, Microsoft
developed a new program, which is called Windows. This program provides GUI
facility and displays the commands as picture-symbols (icons) while various application
programs are presented in rectangular boxes which are called Windows. In this
interface, all the programs are displayed as windows on the screen, hence it's called
Windows.
196

Operating System
NOTES

LINUX Fig. 11.5 : Windows Desktop

Linux is a free Operating system that was developed by Linus Torvalds in 1991, who
was a student of the University of Helsinki. Torvalds initiated development of Linux with
writing the kernel. Kernel is the core program of Linux operating system which is also
called heart of Linux.

After writing kernel, Torvalds sent it to his friends and other computer professionals
through Internet and appealed them to co-operate with him further on its development.
Even today, all across the world people are working on Linux and adding features day
by day. It is happening because Source code of Linux is available on Internet for free
and anybody can download and work on it. He or she can make ammendments and
develop it in his/her own way.

Development of Linux is originally based on the culture of free exchange of thoughts
and softwares. Linux is mainly a free version of Unix. this claim is supported by the
fact that Linux is Posix compliant. Every version of Unix supports Posix. Posix stands for
Portal Operating System Interface for Unix. This is a standard of Computer Industry
Operating System.

Fig. 11.6 : Linux Desktop

197

Fundamentalsof Macintosh Operating System
Computers & Macintosh or Mac operating system is an operating system designed and developed
Information Technology by Apple that runs only on PC's. This is the greatest weakness of this operating system.
Despite this, it is very popular. Its latest version is Mac X Leopard operating system. It has
NOTES many new features which give a new way of arranging files, special features related to
Internet etc.

Fig. 11.7 : Max Axe Leopard the new version of Macintosh Operating System

SUMMARY

 There are a number of operating systems such as single, multi-programing,
multitasking.

 Operating system is the software, mandatory for booting your computer and for
running application software and utility software.

 Operating system controls all hardware resources of a computer system.

 Every program running on a computer is a process.

 Operating system can also write inactive memory pages to secondary storage. This
process is called "paging" or swapping.

 All operating systems include support for a variety of file systems. Modern file
systems comprise of a hierarchy of directories.

 Most current operating systems are capable of using the TCP/IP networking pro-
tocols. One system can appear on a network of the other and can share resources
such as files, printers and scanners using either wired or wireless connection.

 A single user operating system is the one which executes one program at a
time.

 Operating system is a set of special programs which operates the computer and
198 transfers one application from one program to another thus giving speed.

 The use of the word multiprocessing is to clarify the processing view where Operating System
two or more processors are linked to each other. NOTES

 Batch processing is an old method which can execute various programs and Check Your Progress:
is used to execute the task on various data processing centres. 5. H ow many t ypes of an

 MS-DOS is an acronym for Microsoft Disk Operating System. This is most operatingsystem ?
popular operating system. 6. What i s r eal oper at i ng

 Microsoft has developed a new program with GUI facility which displays the system ?
commands as picture – symbols (icons) while various application programs are 7. Definemacintosh operat-
presented in rectangular boxes, which are called windows.
ing system.
 Linux is a free operating system that was developed by Linus Torvalds in 1991. 8. What do you known about
Kernel is the core program of Linux operating system which is also called heart
of Linux. multiuser, multitasking?
199
 Today most modern operating systems contain Graphical User Interface (GUI).
Graphical user interfaces tend to evolve over time.

 A device driver is a specific type of a computer software developed to allow
interaction with hardware devices.

 Booting (Booting up) is a bootstrapping process that starts operating system when
the user turns on a computer system.

 There are two ways of rebooting called cold and warm reboot.

 A warm reboot (also known as soft reboot) is the restarting of a computer without
removing power. The Ctrl-Alt-Del key combination is designed to allow warm
reboot.

 Operating system is a system software.

 It is the first software which loads after the computer starts.

 Operating system provides user interface with the help of which the user com-
mand the operating system or run the application of their choice.

 Operating system performs tasks such as Process management, Memory manage-
ment, Disk and File management, Networking, Safety management, Device Driv-
ers Management etc.

 The memory manager of operating system combines the use of various sorts of
memory.

 Graphical User Interfaces are developing with the passage of time. Windows has
modified the user interface with each Windows version getting released.

 Windows Driver is a computer software which is developed for instruction with
hardware devices.

 Boot sequence is a set of those operations which are performed by the computer.
When the computer starts, the operating system gets loaded.

 On the basis of variety of necessities, operating systems are of five types. These
types are Single User Operating System, Multiuser/Multitasking operating system,
Multiprocessing operating system, Real Time operating system and Batch Process-
ing operating system.

 Single user multitasking operating system which allows a single user to execute
more then one programs on a system.

Fundamentalsof  MS-DOS was a real single user single tasking operating system, while windows
Computers & operating system is a single user Multitasking operating system.
Information Technology
 Multiuser/Multitasking operating system is the one which allows more than one
NOTES users to run more than one programs.

200  Batch Processing is also called serial, Sequential, offline and stacked Job Process-
ing.

 Real Time operating systems are very fast and relatively small operating systems.
Such operating systems are embedded and designed to perform only one type of
task.

 Macintosh operating system or Mac operating system is an operating system
designed and developed by Apple which runs only on PC's.

 The lateset version of Macintosh operating systems is Mac X Leopard operating
system.

ANSWER OF THE CHECK YOUR PROGRESS :

1. There are following Function of Operating System :

(a) Process Management

(b) Memory Management

(c) Disk and File System Management

(d) Networking

(e) Security Management

(f) Graphics User Interface.

2. Booting (booting up) is a bootstrapping process that starts operating systems
when the user turns on a computer system. A boot sequence is the set of
operations the computer performs when it is switched on to load an operating
system. Most computer systems can only execute code found in the memory
(ROM or RAM). Modern operating systems are stored on hard disks, or occa-
sionally on LiveCDs, USB flash drives, or other non-volatile storage devices.

3. Cold reboot–A cold reboot (also known asa hard reboot, cold boot or cold start)
is when power to a computer is cycled (turned off and then on) or a special
reset signal to the processor is triggered. This restarts the computer without
performing any shut-down procedure. It may be caused by power failure, be
done by accident, or be done deliberately.

4. There are a number of operating systems and most modern PCs offer the users
to work on two operating systemson a single system. For instance, you can install
both the Windows and Linux on your PC and can work simultaneously. When
the computer starts, it showsyou a screen of choicesto start with operatingsystem
you need at that point of time. However, there isone primary (that isset default
during installation) operating system that you are not required to choose if you
want it to be loaded. If automatically starts after a few seconds.

5. Types of Operating System–An Operating System hasfollowing types: Operating System
NOTES
 Single User system
201
 Multi Programming

 Multi Processing

 Batch Processing

6. Real Time Operating System–Real Time operating systems are very fast and
comparatively smaller operating systems. Such operating systems are often em-
bedded and are designed to perform only one task. They are generally used
in medical test devices. Life support systems, Scientific devices, Industrial Robots
and Mobile Phones.

7. Macintosh Operating System–Macintosh or Mac operating system is an op-
erating system designed and developed by Apple that runs only on PC's. This
is the greatest weaknessof this operating system. Despite this, it isvery popular.
Its latest version is Mac X Leopard operating system. It has many new features
which give a new way of arranging files, special features related to Internet etc.

8. Multiuser/Multitasking operating system is the one which allows more than
one users to run more than one programs.

EXERCISE

1. What do you mean by an Operating System ?

2. Why do you need an Operating System ? Is it mandatory ?

3. Write functions of an Operating System.

4. Write different types of an Operating System.

5. What do you mean by process management in context of operating system ?

6. Explain the memory management done by operating system.

7. Explain safety management in context of an operating system.

8. What do you mean by booting process ?

9. What is Cold Reboot ?

10. What is Warm Reboot ?

11. Write the arranged sequence of MS-DOS booting process.

12. Write the sequence/order of Windows 98 booting process.

13. Explain Windows XP booting process.

14. Differentiate between single user/single tasking and single user/multitasking.

15. Explain Graphical User Interface provided by the operating system.

16. Describe Five key functions of Operating system.

Fundamentalsof 17. Write short notes on the followings -
Computers & (i) DOS
Information Technology (ii) WINDOWS
(iii) LINUX
NOTES (iv) The Booting Process
(v) Types of Reboot
(vi) Dual Boot
(vii) FAT
(viii) NTFS
(ix) Mac Operating System

202

12 Disk Operating Disk Operating System
System NOTES

The Chapter Covers :

 Introduction
 What is DOS?
 Functions of DOS
 Versions of DOS
 DOS Commands
 Important Internal Commands of DOS
 Important External Commands of DOS
 Executable Vs Non-Executable Files In DOS
 Summary
 Exercise
 Lab Work

INTRODUCTION 203

Disk operating system is a non-graphical textual user interface operating system. Several
versions of DOS are available in the market, which have been continuously providing new
facilities to the users with some of its factures

WHAT IS DOS?

MS-DOS is an acronym for Microsoft Disk Operating System. This is the most popular
operating system of this sort, used in microsoft computers.
In 1984, intel 80286 based micro computer was developed, then only MS-DOS 3.0 and
MS-DOS 4.0 versions were developed. This operating system of Microsoft is called DOS
as it performs Input/Output functions related with disk.

Fundamentalsof FUNCTIONS OF DOS
Computers &
Information Technology DOS works as an Interpreter which establishes a link between hardware and software.
It translates the commands given by keyboard and mouse in such a language that can
NOTES be interpreted by the computer. CPU processes the messages and gives result and
sends them back in the form of messages which are displayed on the monitor, which
204 we can follow.
The brain of the computer is in the system unit, it means it contains CPU, hard disk
etc. But all these are operated by DOS. And DOS is operated by those commands
which you type on the keyboard.
We can perform functions ourselves with the help of DOS.

VERSIONS OF DOS

Uptil now 1–6 versions of DOS have flooded the market. Amidst them 6.22 version
is the latest. Every version has some additional features which you can use. If your
computer has a version below 6, the command applicable only to the 6th version
cannot be applied, but DOS-6 can apply all below the very version.

DOS COMMANDS

We know that a computer works in the presence of an operating system. MS-DOS is
an operating system which runs the computer. When an operating system runs a
computer system, to establish a link between the user and the hardware, it provides
the facility of instructions for the user through command interpreter. MS-DOS provides
this facility to users through the commands of two types. These are – Internal commands
and External commands.

 Internal Commands – These commands are always available with DOS because
these commands are automatically stored in the memory at the time of booting.
All these commands are collected in COMMAND.COM program file. Hence these
commands are always available, until we switch off the computer.

Therefore we can execute the Internal commands whenever we want to. A few
examples of Internal commands are – DIR, RENAME, COPY, TYPE etc.

DIR MD CD RD

MKDIR CHDIR RMDIR COPY

REN DEL COPY CON VOL

DATE TIME CLS PATH

Table 12.1 : Internal Commands

 External Commands – External commands are short programs which are stored
either on floppy disk or hard disk and if needed, they are executed and stored
in the memory.

The examples of External commands are– FORMAT, CHKDSK, PRINT, DISKCOPY etc.

CHKDSK XCOPY PRINT DISKCOPY
DISKCOMP DOSKEY TREE M OVE
LABEL APPEND FORMAT SORT
FDISK BACKUP EDIT MODC
ATTRIB HELP SYS DELTREE

Table 12.2 : External Commands

IMPORTANT INTERNAL COMMANDS OF DOS Disk Operating System
NOTES
DATE COMMAND
Date command shows the current date and enables you to reset it. Type the following 205
command for it.

C:\> DATE
In this situation the screen will display like the following picture :

C:\>DATE
Current date is Thu 03-12-2005
Enter new date (mm-dd-yy)

C:\> DATE
Current date is Thu 03-12-2005
Enter new date (mm-dd-yy)

If you don't have to change the date, press key. If you want to change the date, type

it in the form of month-day-year
TIME COMMAND
By Time command, you may show the current time or can reset it. For using it, type the
following command :

C:\> TIME
In this situation the screen will appear like the following picture :

C:\>TIME
Current time is 4:55:55:54p
Enter new time :

If you don't want to change time, press  and if you want to change it, type the correct

time.
DIR COMMAND
Dir command is one of the internal and basic commands of Disk Operating System. It is
used to show the list of available files and directories on the disk. It can be used for the
following purposes :

1. Projecting the list of content of the original directory.
2. Displaying the list of the content of some specific directory.
3. Displaying the list of contents of a particular drive.
4. Displaying the list intermittently.
5. Displaying the list in width.
Type the following commands on DOS prompt to display your files on the screen :

C :\> DIR

You will view the list of files and sub-directories in the root directory. The list displayed
in Figure 12.1 will be different from your list, as there may be other sorts of files on your
computer.

Fundamentalsof As soon as you pass DIR command, it automatically displays the list of all files and sub-
Computers & directories from the currently active directory on the screen.
Information Technology
C:\> DIR 
NOTES
In this condition this command will work such as you open the drawer of your file cabinet
to view all the folders and the documents in it.
The Figure 12.1 shows the information displayed by DIR command.

Files Directory

Figure 12.1 : List displayed using DIR command

MD COMMAND

MD command and MKDIR command, both are used to serve the same purpose. These
are internal commands. These are used to make Application Directory or Sub Directory.
The naming rules of the directory are the same as that of files but as the practice allows,
the directories are not given extension names because directories are, in fact, same, with
no difference in their nature.
For example, if we have to make a directory named PRAGYA on C prompt, we'll type the
same command-

C:\> MD PRAGYA  (can use MKDIR in place of MD)

Now, suppose, we have to make one directory, means sub-directory named DOEACC
inside PRAGYA we'll give the following commands-

C:\> CD PRAGYA  (First we'll enter PRAGYA through CD Command)
C:\PRAGYA> MD DOEACC 

A subdirectory named DOEACC has been created within the directory PRAGYA which
you can view with the help of DIR.
SHOWING THE FILES OF OTHER DIRECTORY THROUGH CURRENTLY ACTIVE
DIRECTORY
Having specified full path after DIR command, you can view the files of other directory
or sub-directory through currently active directory.
For example, current active directory is the root directory and you want to view the list
of files of WS directory, pass the following command:

C:\> DIR WS

To view the list of files of some other drive, suppose you are in C drive and want the
list of directories of A drive, type the following command–
206

C:\> DIR A : 

If the file list is very long and cannot be displayed on the screen at a time, all the Disk Operating System
files will swiftly pass on the screen and you will be able to view only few names of NOTES
the files in the end. To get rid of such situation, type the following command :

C:\> DIR/P

This command will stop the list of files when the screen is full. The screen having been
full, this information is displayed below, "press any key to continue ...." and the list of files
will stop going out of the screen.

you now can press any key and see the list further.

C:\> DIR/W : This command /W displays the file names in width.

The file names will appear on the screen in five columns. Other information regarding the
files such as – size, date, time etc. will not be displayed.

DIR COMMAND WITH DIFFERENT SWITCHES

We can add switches to display the list in different ways. The DIR command with switches
is as follows -

DIR/AH – Displays the list of hidden files.

DIR/AS – Displays the list of system files.

DIR/S – Lists the directories with their sub-directories and files.

DIR/OA – Lists the directories first.

DIR/ON – Lists the directories and files in alphabetical order (i.e. A to Z)

DIR/O-N – Lists the directories and files in a reverse alphabetical order (i.e.
Z to A)

DIR/OD – Lists the files and directories age-wise (older to newer)

DIR/O-D – Lists the files and directories in newer to older way.

Directory Size of files in bytes
Date of file created or edited
Extension name
of the files

Label of the hard disk.

Copy serial no. of the program Volume in drive C is Amar
Name of the drive and
directory Volume Serial Number is 1321-15D6
Primary names of files/
Names of directories Directory C:\ Check Your Progress:

No. of files and directories COMMAND COM 47,875 04-07-02 11:00a 1. What isDOS?
in the list 12:47p
DISKCOPY COM 11,475 07-21-02 1:00p
Total space in bytes 5:00p
occupied by the files AUTOEXEC BAT 12,642 07-21-02 11:40a 2. What is I nt er nal
2:30p Commands ?
CONFIG SYS 249 07-21-02

DOS <DIR> 07-21-02

WINDOWS <DIR> 07-21-02 3. Defi ne Ext ernal

4 file(s) 118510 byte Commands ?

2 dir(s) 327784 bytes free 4. What does MD
Commanddo?
Free space available
on disk Time of file created or edited

Fig. 12.2 : Displaying additional defaults in the list 207

Fundamentalsof CHANGING THE DRIVE
Computers &
Information Technology The computer pays attention to only one drive at a time. If you want your computer to
work on another drive, type the name of the drive followed by the colon symbol.
NOTES
C:\> A :
208
The colon mark ( : ) is always writien after the drive-letter without leaving any space.

We change the drives only when we have to access the files of some other drive.

In the example given above, we find that :

 If floppy disk is not available in A drive, the computer will display this
information.

Not ready reading drive A
Abort, Retry, Fail ?

In such a condition, insert floppy disk in Drive A and press 'R' key.

 If you press 'A' instead of 'R' key, the computer will show this menage:

Not ready reading drive A
Abort, Retry, Fail ?

 If you press 'F' key instead of 'R' you will get the following information:

Current drive is no longer valid >

If you want to get back again to the C drive, you type C : and press Enter
key.

 If you are informed :

"Invalid drive specifications"

It means you have instructed your PC to change to the drive which does not exist.
For example, your computer has A and C drive, and you have commanded to change
to D.

 The name of file preceded by one letter and colon mark ( : ); shows

that this file is available on that drive e.g., A:COMMAND.COM shows that
COMMAND.COM exists in the floppy disk of drive A.

COPYING A FILE

Suppose you want to store two copies of one file at a single place (but you must know
that there cannot be two files with same name at one place, that's why we put the copy
of our file by some other name) this can be done through Copy command. You must
know the root filename and the name of the copy of the file.

To deal with this, you type COPY command and type the root filename leaving one space
blank and again leave one more space, thenafter type the new name of the file to be
copied.

Suppose you have to prepare a file named COMMAND.COM and you have to name the
copy of the file as MAIN.COM, the command will follow like this :

C:\> COPY COMMAND.COM MAIN.COM

This command will make a copy of COMMAND.COM which will be named MAIN.COM
and both the files will be present in C drive.

If your computer types :

"File cannot be copied onto itself" Disk Operating System
NOTES
It means either you have forgotten to type the new filename or you have typed the
same name like the Root file. 209

   Two files cannot take the same name at one place.

 If you are working on A drive then a copy of the file
COMMAND.COM in A drive, as MAIN.COM will be created in A
drive only.

COPYING A FILE
To copy from one place to another, the COPY command is used.
To pass copy command type the word 'COPY'. Leave one space blank and type the
name of the file which is to be copied, then leave one more space blank and type
the name of the place from where the file is to be copied and in the end type the
filename.
Suppose, you want to copy COMMAND.COM from C drive to A drive, give the
following command :

C:\> COPY COMMAND.COM A :
This command will copy COMMAND.COM from C drive to A drive and DOS will
display following information on the screen :

1 file (s) copied

   If you want to name the Copy file same as the Root file, you needn't

give the filename in the end, as it has been done above.
 It is necessary to type colon mark (:) after typing the name of the drive

in which the file is to be copied.
 If you want to view whether the file has been copied in a floppy disk,

you may pass this command :

C:\> DIR A :  (For A drive)

COPYING THE FILE FROM A DRIVE TO C DRIVE
If you want to copy the file from A drive to C drive, the COPY command will remain
the same with slight changes. By the following command the file NAM.TXT will be
copied from A drive to C drive by the name of VIK.TXT.

C:\> COPY A:NAM.TXT C:VIK.TXT
If you do not want to change the name of your file, do not type a new name in the
command. In that condition, the command given above will display like the following
:

C:\> COPY A : NAM.TXT
If you get an information :

"Overwrite Nam.txt (Yes/No/All)"
Then it means, the file you are trying to COPY from A drive to C drive or C drive
to A drive is already present in that drive.

 If you want to write the file you are copying over the one that is present in
that drive, you may press Enter key after pressing 'Y' or 'A' key.

 If you don't want to write the new file over the old one, you may press 'N'
key and then press Enter.

COPYING THE FILE FROM ONE DIRECTORY TO ANOTHER

To copy a file from one directory to another, direct the path of 'Source' and 'Destination'
directories in COPY command. For example, to copy the file COMMAND.COM from root
directory to DOS directory, type the following command :

C:\> COPY COMMAND.COM\DOS

Fundamentalsof Likewise, to copy the file LETTER.DOC from any other directory like WS directory to
Computers & the current directory, type the following command:
Information Technology
C:\> COPY\WS\LETTER.DOC
NOTES The directory in which the file is to be copied has not been indicated, as the file is
to be copied in the current directory.
If the computer informs you that :

"File not found"
 You must have typed the filename incorrect.
 The file might not be present in the directory. You should try to find out that

file using DIR command.
 If you get this indication :

"Path not found"
You might not be giving correct path for the file.
PATH COMMAND
PATH command is an internal command which was introduced in the 2.00 version of
DOS. It is used to access files available on some other directory or disk. PATH
command is normally inserted as a row/line in AUTOEXEC.BAT file.
PATH command is used to show path-set-up. Besides, with its help, you can set a new
PATH. For example, to see current path set up, type PATH command on C Drive and
Press Enter Key.

Fig. 12.3 : A sample of path command

Let us look at an important example before setting up a PATH with the help of PATH
command. Suppose, you want to access LOGO.EXE executable file in the original
directory which is present in a directory named LOGO. Normally, with the current path
setup, until you enter the LOGO directory, you cannot execute LOGO.EXE. In this
condition, giving the following command, can link LOGO directory to the current path
setup and can execute LOGO.EXE from the original directory-

PATH = C:\WINDOWS;C:\WINDOWS\COMMAND;C:\OPAWIN\BIN;C:\LOGO
After typing the above command press Enter key.
WILD CARD (?, * ) CHARACTERS
By using the symbols of wild card (?, * ) you may give the context of all the files.
Sometimes, similar groups of files are to be copied or deleted. For this, wild cards can
210 be used.

WHAT IS QUESTION MARK (?) WILD CARD ? Disk Operating System
NOTES
Question-mark wild card is used to introduce one character in the filename. If you
want to make a list of those files in C drive which have 6 characters and their extension 211
name is .EXE, type the following command.

C:\> Dir ?????? .EXE Volume in drive C is Amar

(See A Figure 12.4) Volume Serial Number is 1321-15D6
Directory C:\

Remember that the question marks CHKDSK EXE 26200 04-09-02 4:00a
are to be used as many times as there SETUP1 EXE 15656 04-09-02 4:00a
are characters in the filename. Your APPEND EXE 14896 04-09-02 4:00a
computer screen will be like the figure
as shown in 12.4. Figure 12.4 : List displayed as a result of
command DIR ??????.EXE

If you want to make a list of all those files which start from MONTH and are followed
by two letters and their extension name is .DAT, the following command will be given
:

C:\> DIR MONTH??.DAT

This command will make a list of those files having two characters after MONTH such
as MONTH10.......MONTH99, MONTHLY etc. but it will not show a file like MONTH102.

WHAT IS (* ) STAR WILD CARD ? Volume in drive C is Amar 4:00a
Star wild card is used to display a Volume Serial Number is 1321-15D6 4:00a
group of letters in the filename. Directory C:\ 4:00a
Suppose you want to make a list of CHKDSK EXE 26200 04-09-02 4:00a
those files which have their extension ATTRIB EXE 15656 04-09-02 4:00a
nameas.'EXE', you will have to type APPEND EXE 14896 04-09-02 4:00a
the following command : PRINT EXE 1874 04-09-02 4:00a
LOTUS EXE 14789 04-09-02
C:\> DIR * .EXE LOCATER EXE 12454 04-09-02
and the screen will show as in DECOVER EXE 1425 04-09-02
Figure 12.5.
Figure 12.5 : List displayed as
COPYING USING WILD CARDS a result of DIR* .EXE

Suppose, you want to copy all the files, which have their extension name .DOC to the
floppy disk, type the following command :

C:\> COPY * .DOC A:

COPYING USING WILD CARDS TO A DISK

If you want to copy all the files such as CHAP10, CHAP11, CHAP12.........etc. on disk
A, type the following command :

C:\> COPY CHAP?? A:

If you are informed on the screen :

'Bad command or filename'

It means you typed the incorrect command. Type the command again. Mind that you must
leave space gap between command and filename and do not forget to use colon ( :
) after drive name.

DELETING THE FILE

Any file may be deleted by giving DEL command. Type DEL for deleting a file, leave
a blank space then type the drive containing that file. After that type ( : ) colon and
then the filename which is to be deleted. If the file is in the same drive, you are
working in, it doesn't matter whether you mention the drivename or not. If you want

Fundamentalsof to delete the file SAMPLE.BAK, which is on C drive, type the following command :
Computers & C:\> DEL SAMPLE.BAK
Information Technology
If the file you want to delete is not there or if you have typed the incorrect name.
NOTES 'File not found' will display on the screen.
When you use * .* , DEL command becomes very sensitive as it deletes all the files.
212 Therefore when you type,

C:\> DEL*.*
DOS prompt will let you ensure as follows :
All files in directory will be deleted from C drive :

Are you sure (Y/N) ?
If you do not want to delete all the files, press N and if you think you don't need any
file, press Y. Doing this, all your files will be deleted
DELETING FILES FROM ANOTHER DISK
When you are on C drive, you can delete files from A drive by DEL command.
Suppose you want to delete AGE .DOC file from A drive, you will have to give the
following command :

C:\> DEL A : AGE .DOC
DELETING A GROUP OF FILES
Suppose you want to delete all the files with extension .BAK, which are on C drive, give
the following command :

C:\> DEL * .BAK
DELETING A GROUP OF FILES FROM ANOTHER DISK
Suppose you want to delete all the files with extension name .DOC from drive A, type
the following command :

C:\> DEL A : * .DOC
RENAMING A FILE
You can change the name of any file with the help of DOS by REN command. Type REN
command, leave blank space, write the old filename, leave one more blank space, type
the new name.
For example : If you want to rename a file TEST.BAK as RESULT.BAK, type the following
command.

C:\> REN TEST.BAK RESULT.BAK
RENAMING A FILE ON ANOTHER DISK
You'll have to type REN command to rename a file on another disk.
If you want to rename a file SHALINI.TXT of A drive as VIKAS.TXT, pass the following
command :

C:\> REN A : SHALINI.TXT VIKAS.TXT
If you get the following information on the screen :

Duplicate Filename or file not found
It means the new name of the file which you have typed is already present there or
there is no existence of such filename. So try again.

RENAMING A GROUP OF FILES Disk Operating System
NOTES
Suppose you want to change all the files with extension .BAK into. BAD extension
name, you can do it by the following command : 213

C:\> REN * .BAK * .BAD

  REN command is different from the COPY command. REN command

changes the filename while COPY command copies the file. REN command
can be written as RENAME also.
RENAMING A GROUP OF FILES ON A DISK
You will have to apply the following command to rename all the files with extension
name.TXT into.PRN extension.
C:\> REN A : * .TXT * .PRN
CLEARING THE SCREEN WITH CLS
If you want to clear the screen and get your prompt to the first line on the screen, type
the following command.

C:\> CLS

CANCELLING A DOS COMMAND
By pressing Ctrl+ C, DOS command can be cancelled.
It is very beneficial. If you have typed an incorrect command and you want to cancel it,
you can do so. When this command applies, you will view on the screen ^ C and then
DOS prompt, it cancels the current command.
CREATING A FILE
We at times need to create files in DOS. To suffice this need, we use COPY CON
command in the following way -

C:\> COPY CON < Filename> 
TYPE YOUR TEXT 

^ Z or F6
For example, you want to create a file named PRAGYA and write a message in the file
to send it to somebody.
Do like this -

C:\> COPY CON PRAGYA 
PRAGYA IS A LEADING NAME IN THE FIELD OF PUBLICATION 

^ Z or F6
While using the command, the following points should be kept in mind.

 Space must be left between COPY, CON and filename.
 File should not be empty. There must be some content in the file.
 Contents should be saved using either Ctrl+ Z (^ Z) or F6.
 Files can also be created with an extension like PRAGYA.TXT and PRAGYA.BAT.

CREATING A BATCH FILE

Batch file is an executable file. Its extension name is BAT. It is used to execute a series
of commands in a batch system. That means, a series of commands are stored in a batch
file and when the file is run, the commands are executed in the same order. If you have
created a macro in windows application programs you can better understand what batch
file does. It is similar to making a common file on DOS using COPY CON command.

Fundamentalsof What is special about creating a batch file is that here adding its extension .BAT is
Computers & mandatory. For instance, let us execute the following commands in a batch file named
Information Technology MAN

NOTES CLS
PATH = C:\WINDOWS
DIR/P
To create the file as above, do the following -

C:\> COPY CON MAN.BAT
CLS
PATH = C:\WINDOWS
DIR/P

Afterwards, press CTRL and Z together to save the file. To run the file, simply type MAN
(no need to type MAN.BAT) like any other command. As a result you will view the listing
under WINDOWS directory.
DISPLAYING THE CONTENTS OF A FILE
We create files to store some content and see them later, if required.
To see the contents of a file, we use TYPE command. For example, we can see the
contents of the file PRAGYA created earlier in this way-

C:\> TYPE PRAGYA 

As soon as we press Enter key, we get the contents, we had stored earlier.
EDITING THE CONTENTS OF YOUR FILE
We use EDIT command to modify the contents of the file created in MS-DOS. The syntax
is as follows -

C:\> EDIT < Filename> 

For example, to modify the contents of the file named PRAGYA just created type the
command as follows -

C:\> EDIT PRAGYA 

Consequently, MS-DOS Editor appears as the one in Figure 12.6 where you will see the

contents created by you. Modify as desired and click File  Save to save the changes.
To quit, click File  Exit.

214
Figure 12.6 : MS-DOSEditor

MAKING & NAMING A DIRECTORY Disk Operating System
NOTES
The rule of naming a directory is similar to that of naming the files, but as it is in vogue,
directories are not given extension names. 215

To make a directory or sub-directory, the MD command is used.

First type MD, then leave a blank space, and then type the complete path for the location
where the directory is to be made.

Let us see how directories are created.

Step 1 :

Suppose there are two directories SALARY and BILL to be created inside root directory.
You will have to type the following commands :

C:\> MD SALARY
C:\> MD BILLS

First command makesSALARYdirectory and the second command makesBILLSdirectory.

If you get the message that Volume in drive C is Amar 4:00a
directory already exists, it means a Volume Serial Number is 1321-15D6 4:01a
directory of this name is already Directory C:\
there so, you will have to give SALARY <DIR> 04-09-02
another name to the directory. BILLS <DIR> 04-09-02
If you give DIR command and press
the key, the screen will appear like Figure 12.7 : Directories created in C: drive
one in Figure 12.7.

It shows that these two directories are inside the single root directory.

Step 2 :

In this step, we will create two separate sub-directories. It means OFFICERS and
CLERKSdirectories in SALARY directory and NORTH and SOUTH directories in BILLS
directory.

C:\> CD SALARY
C:\SALARY> MD OFFICERS
C:\SALARY> MD CLERKS

The first command enters you into SALARY directory and second and third commands
create sub-directories OFFICERS and CLERKS respectively. Now, enter commands to
create sub-directories NORTH and SOUTH under BILLS directory in the following
way:

C:\SALARY> CD\
C:\> CD BILLS
C:\BILLS> MD NORTH
C:\BILLS> MD SOUTH

In the above, the first command gets you back to the C drive, the second one enters
you into BILLSdirectory and the third and the fourth ones create NORTH and SOUTH
sub-directories under BILLS directory respectively.

Step 3 :

Now we shall create sub-directories CASH & CREDIT inside North sub-directory.
For this we'll have to pass the following command :

C:\> CD BILLS
C:\BILLS> CD NORTH
C:\BILLS\NORTH> MD CASH
C:\BILLS\NORTH> MD CREDIT

Fundamentalsof The above commands create two sub-directories CASH and CREDIT inside NORTH
Computers & sub-directory.
Information Technology MAKING A DIRECTORY ON FLOPPY DISK
It is not much different from creating a directory on C drive. For it you'll have to turn the
NOTES drive into A and then give MD command. If you want to name your directory VIKAS on
A disk, type the following command :
216
C:\> A:
A:\> MD VIKAS
First command is written to go from C drive to A drive. If you are in A drive, you needn't
do so.
CHANGING THE DIRECTORY (CD COMMAND)
If you have to reach to the files of some specific directory, you'll have to use CD
command. First type CD, then leave a blank space and then type the name of the

directory to which you have to reach and press  in the end.

If your directory is a part of some other directory, you'll have to type the whole path to
the directory.
If you have to go to the current directory, you needn't direct the path. For example, if
you have to go into SALARY directory on C disk, type the following command :

C:\> CD SALARY
Before giving the above command you were in the C drive. After giving the command you
will reach to SALARY sub- directory and your DOS prompt will be the following :

C:\SALARY>
If you want to reach to the files of OFFICERS sub-directory under SALARY directory, your
command will be like :

C:\SALARY> CD OFFICERS
Now your prompt will be the following :

C : \SALARY\OFFICERS >
GOING BACK TO THE ROOT DIRECTORY
If you are in OFFICER sub-directory and want to get back straight to the root directory,
type the following command.

C:\> SALARY\OFFICERS> CD\

GOING BACK TO THE ROOT DIRECTORY STEPWISE
If you are in sub-directory CASH and want to get back to sub-directory NORTH, type the
following command :

C:\BILLS\NORTH\CASH> CD.. 

It means type CD, put two dots ( .. ) and press

It will take you one step up; it means you will get to NORTH, the main directory of CASH
and the DOS prompt will be the following :

C:BILLS\NORTH>
If you want to go straight from sub directory CASH to the directory BILLS, type the
following command :

C:\BILLS\NORTH\CASH> CD\ 

REMOVING A DIRECTORY Disk Operating System
You need to remove some sub-directories from floppy disk or hard disk. RD command NOTES
of DOS may be used in this case. Syntax is as follows-
217
C:\> RD < directoryname>

Example : C:\> RD BILLS 

The above command deletes the directory named BILLS. Before you are going to
remove a directory, note the following points :

 Ensure that all the files have been deleted from the sub-directory– it means
it shouldn't have any file or sub-directory.

 You should be out of that sub-directory which you have to remove.
RENAMING A DIRECTORY
To rename a directory, we use MOVE command. For example, you have to change
the name of a directory PRAGYA to CRESCENT, type the command like this -

C:\> MOVE PRAGYA CRESCENT 

The above command will rename the directory PRAGYA to CRESCENT.
COPY CON COMMAND
Even, we need to make small files in DOS. For it, we use COPY CON command. It's
an internal command. Suppose we have to make a file PRAGYA, write the commands
like this-

C:\> COPY CON PRAGYA 

PRAGYA IS A LEADING NAME IN THE FIELD OF PURLICATIONS
^ Z or F6
Pay attention to the following things while making a file -
1. Leave space between COPY, CON and filename.
2. The file should not be empty. It must contain content.
3. After writing the content you should press Enter and come to the line below and
save the content with F6 or Ctrl+ Z or you will not be able to make a file and
you'll not be able to come to command prompt C:\> .
4. We can make the file with extension. Such as PRAGYA.TXT and PRAGYA.BAT
PROMPT COMMAND
PROMPT command helps you change the DOSprompt as per your own will. Mostly when
you switch on your computer, either C:\> or A:\> prompt is displayed. Type the following
command to turn the prompt into disk name.
C:\> PROMPT DISK
After this command, the screen will appear like this :

C:\>PROMPT DISK
DISK

Note the cursor isready to
accept the command

Fundamentalsof Mind that, now, the DOS prompt has become DISK. If you want, you can change it
Computers & again. Generally your DOS prompt is C:\> or A:\> . After giving the following command
Information Technology it becomes C> or A> .

NOTES C:\> PROMPT 

218 To get back to your original prompt, type the following command :

C:\> PROMPT $P$G 

Where $P and $G stand for path and greater than (> ) respectively.
VER COMMAND
VER command is used to know which version of MS-DOS you are working on. To do
this, just type the following command -

C:\> VER 

VOL COMMAND
VOL command is an internal command which was introduced in 2.00 version of DOS.
It is used to show the volume lavel or name of the specified disk. When you format
the floppy disk, after the formatting is over, DOS displays the following message -

Volume Label < 11 characters, ENTER for none> ?
This time, you give a name to the disk which is displayed with the help of VOL
command. To understand it in a better way, see LABEL command which has been
discussed in the section ahead.
IMPORTANT EXTERNAL COMMANDS OF DOS
External commands are being discussed as ahead -
THE FORMAT COMMAND
When you purchase a new floppy, you need to format it, so that computer can read
it. For that, first we type FORMAT, then leave one blank space and then type the drive
name, which you want to format. It is necessary to put colon (:) after drive.
You can format the floppy by the following command :

C:\> FORMAT A :
Following information will display on the screen:
Insert new diskette for drive A : and strike ENTER when ready ....
Insert the floppy in the drive, which has not been formatted, then close the drive door

and press .

The floppy having been formatted, the following information will display on the screen.
Volume label < 11 characters, Enter for none> ?

Here you can name the floppy. If you don't want to do so, press 

Now computer will display some information which can be ignored.
DOS will ask whether you have to format another floppy (format another Y/N). If not,
press N.
MAKING A DOS DISK OR BOOT DISK
Along with formatting a disk you can turn it into a DOS disk for Booting (for running
the computer). For this, you will have to issue the following command:

C:\> FORMAT A:/S

/S transfers all the system files of DOS on floppy disk. Disk Operating System
NOTES
 If you already have a formatted floppy and you want to turn it into a DOS
disk, it needn't be formatted again. By typing the following command your
boot disk will be ready.

C:\> SYS A : 

If there is some information in the disk you are formatting, it will be deleted after
formatting without giving any warning about it. Mind that you should insert only that disk
which is empty or contains such information which is no longer needed.

DELTREE COMMAND

This command is used to delete all the contents of a file together at a time. For example,
a directory named MAN contains several sub-directories and files. To delete the entire
directory MAN with all its contents type the following command on your screen.

C:\> DELTREE MAN 

This command is highly sensitive. Hence, when you type the above command and press
Enter, your computer cautions you with a message like this -

Delete directory "man" and all its sub directories ? [yn]

Think twice if you are pressing y. MAN directory may carry some vital information.

THE CHKDSK COMMAND

This command is used to get information about the available space in the disk and
memory. It is also used to correct the disorder in the data-structure.

 To do this, use the following command :

C:\> CHKDSK

 After the command executes, information will be displayed on the screen as
shown in Figure 12.8.

Fig. 12.8. : Result of CHKDSK command 219

Fundamentalsof CREATING A COPY OF FLOPPY DISK
Computers & Floppies should be duplicated at a regular interval as floppies usually get corrupt and
Information Technology become useless, consequently, data getting lost. In this case, if you have another floppy
having the same data, you can prevent a big trouble. To execute this command, type
NOTES DISKCOPY at DOS prompt, leave one space, type the name of the drive.
DISKCOPY command helps in creating a copy of the same kind of disk.
220 Type the command like this -

C:\> DISKCOPY A: A: 

(Here A drive is source as well as destination.)
Computer then displays the following message.

Enter source disk in Drive A
And Press any key
Now, insert the disk which is to be copied and press any key.
After a while, computer puts another message on the screen like this -
Enter target disk in Drive A
And press any key
Insert a blank floppy into drive and press any key.
THE XCOPY COMMAND
XCOPY command is a better alternative of COPY command. This command is available
in DOS 3.2 and its latter versions. This command acts quickly and helps you copy entire
directory or sub-directoriy with all the files (excluding system and hidden files).
Use the command in the following way -
XCOPY < Source> < Destination>
For example, to copy all the contents of RAHUL directory to the floppy, use the command
as such -
C:\RAHUL> XCOPY * .* A:/S
(/S helps you copy sub-directories and files.)
PRINT COMMAND
PRINT command is available in 2.00 and advancec versions of DOS. This command is used
for printing more than one files while doing some other operations. When the PRINT
command is used, it takes the space of approximately 3200 byte in the memory. To print
the file, the standard of the file should be in text or ASCII, besides it is in co-ordination
with the printer. Its format is -
PRINT < filename>
After giving the appropriate file name with the above given command the following
message appears-
C:\> PRINT MAX
Name of list device [PRN] :

If you have a parallel printer, press . After it, the print action starts with the
following message -

Resident part of PRINT installed Disk Operating System
C:\MAX is currently being printed NOTES
C:\>
221
If a standard parallel printer (PRN or LPT1) is attached to your computer you can type the
name of the device for your printer. Such as COM1, LPT2 or AUX) and press
again. When your document is printed, you can complete other actions. This process is
called print spooling or concurrent printing.
With the help of PRINT command, you can give appropriate command to print more than
one files. For example, you can issue the following instructions to print the file LETTER
of A drive with MAX.TXT, RAJ.DOC of C drive -

C:\> PRINT MAX.TXT RAJ.DOC A:LETTER

After typing the above given command, press After this, the file printing process
starts with the following message

C:\> PRINT MAX.TXT RAJ.DOC A:LETTER
C:\MAX.TXT is currently being printed
C:\RAJ.DOC is in queue
C:\LETTER is in queue

C:\>

When MAX.TXT is being printed, all the other things except printing can be done. See the
following table :

Option Example Function

/T PRINT/T Cancels the printing of the files in all the rows.

/C PRINT A:LETTER Cancels the printing of the named file.

/P PRINT A:MAN Links named file to the printing row.

/P /C PRINT A:LETTER/C Cancels the named file and as per the.

A:MAN/P Instructions links new named file to the printing row.

Table 12.3 : Options used with PRINT command

COMPARING TWO DISKS

To compare two disks, the following command can be used -

C:\> DISKCOMP A: A: 

When computer asks you to insert floppy into drive A, insert the first floppy, press Enter
key and again as computer asks, insert second one after removing the first one out and
press Enter key.

This command is mainly used to ensure correct duplicating of floppy diskettes.

DOSKEY COMMAND

The use of DOSKEY command started from DOS version 5.00 and it is available in the
versions released after this. Before using this command, it is to be activated in the

memory. To activate it, type DOSKEY and press This command is used to store

the DOS commands to be used in the DOS prompt in the memory buffer and with the

help of buffer can display them in the same order with the help of up and down

keys. Besides it, the options given in the table can be displayed.

Fundamentalsof O pt i on Function
Computers &
Information Technology brings the previous DOS command back to the prompt. you can
cancel it using .
NOTES
F7 displays the history of commands.
222
ALT+ F7 clears the command history.

F8 Looks for the command history.

F9 Selects the command on the basis of the displayed number.

ALT+ F10 clears all the macro definition.

Table 12.4 : Options of DOSKEY command with their functions

TREE COMMAND

You may see the list of directories and files in a tree form. To do so, type TREE at the
DOS prompt as follows -

C:\> TREE 

To see directories of the disk on drive A, type the following command-

C:\> TREE A: 

C:\>TREE

Directory PATH listing for Volume HARD DISK

Volume Serial Number is 1724-0637

C:

HARDCARD

DOS Sub-directries

DATA

COLLEGE

FIGURES

WORDS

WORK Sub-sub-directories

CHOICE

WP51

MACROS

MISC

BOOK

QPRO

MOUSE

C:\>

Fig 12.5 : Result of TREEcommand

Both the commands used above display only directories and their sub-directories. If you
want to display files altogether, type the command in this way -

C:\> TREE /F 

The above command can also display the list screen wise. Just add MORE like this -

C:\> TREE /F ¦ MORE 

LABEL COMMAND
LABEL command is used to name your drive or diskette. Just type the command to
do this -

C:\> LABEL 

When you execute the above command by pressing ENTER key a message appears. Disk Operating System
Type the label name and press ENTER in the last line of message. NOTES

C:\> LABEL 223
Volume in drive C hasno label
Volume Serial Nubmer is104D-14D4
Volume label < 11 characters, ENTERfor none> ?

Fig. 12.10 : Inserting new label

APPEND COMMAND

APPEND command is similar to PATH command in which it makes DOS search for the
directory. Besides it helps search for the current directory of the specific file. The
current directory is searched for first. After, it DOS looks for certain files in the
directory which you have given with APPEND command.

APPEND command is an external command, but once it is loaded, it occupies space
in the memory and behaves like an internal command. It can be used in several ways.
Its function have been described in the following table :

Command Functions
APPEND When used alone, APPEND command, shows the
list of the path of the appended file. After this
APPEND; command is given, if no appended path is available,
APPEND/PATH:ON it releases No Append message.
APPEND/PATH:OFF Cancels the path already appended.
Gets the old path already appended.
It cancels the current path of DOS and DOS accesses
only the files which are in the current directory.

Table 12.5 : Options of APPEND command with their description

Likewise APPEND is used with several other options.
APPEND VS PATH COMMAND
Here APPEND and PATH commands are identical in so many ways. PATH command
searches only for those files whose extensions are .BAT, .COM and .EXE, it means the
files should be executable. With APPEND command, it is a bit different. With the help
of this command you can use any type of files. For example, by using TYPE command
of DOS, you can show the text file on the screen in the appended file path. It is
possible with PATH command.
With the help of APPEND command, you can access both the executable and data
file through any path available on the system. Hence, there is no heed to keep utilities
or reference in multiple directories.
For example, you have a file named MAX which is on the root directory C and right now
you are in C:\WINDOWS\SYSTEM directory. If you have to view the contents of MAX
file, first you'll have to come out of WINDOWS\SYSTEM and after viewing it, again you'll
have to come back to WINDOWS\SYSTEM which is time-taking task. APPEND command
can simplify this task. Type the following command staying in the SYSTEM directory itself-

APPEND C:\
After executing the above given command, you can view the contents of the MAX file
by giving the following command :

TYPE MAX

SORT COMMAND

SORT command is filter command of DOS which was included in the 2.00 version

Fundamentalsof of DOS. This is an external command. SORT command, by intercepting the numeric
Computers & data arranges it into alphanumeric order. The normal format of SORT command is like
Information Technology this -

NOTES SORT Source File > Destination file

The above given command by arranging the content of the sourcefile in a directed
order copies it to the destination file. By giving the above command, you needn't make
destination file. It automatically does so, you can execute the content of the destination
file by giving the following command :

TYPE < destination file>

Command Function

DIR | SORT This command shows the list of directories in alpha-
betical order.

DIR | SORT/R This command shows the list of directories in the
reverse of the alphabetical order.

DIR | SORT > DIRFILE This command arranges the list of directories in alpha-
betical order and stores it into a file named DIRFILE.

SORT < FILE1> FILE This command arranges the text rows present in com-
mand FILE1 and stores it into FILE2.

DIR | SORT > PRN This command prints the sorted directory on the printer.

Table 12.6 : Different forms of SORT

For example, we create a file named ITEM with the help of COPY CON command, in
which you type the text like this -

LUX
RIN

WHEEL

HAIR CARE

NESCAFE

DOVE

Figure 12-11 : Content arranged alphabetically
224 After this, it is stored with the help of F6 or CTRL+ Z. Then we type the following

command- Disk Operating System
SORT ITEM > ITEM1 NOTES

Now the content of the ITEM file having been arranged in alphabetical order is copied 225
in ITEM1. To view it, type the following command -

TYPE ITEM1
After it you will have the content of ITEM1 in an arranged manner.
FDISK COMMAND
FDISK command is an external command of DOS which was first inducted into 2.00
version of DOS. Its use organises the hard disk in partitions, which to separate the usable
area, allocates space in the disk.
Every partition is given a logical drive letter such as C, D and E when more than on
partitions are used on a single disk drive.
BACKUP COMMAND
It is necessary that you have more than one copies of your important files. This can be
done through BACKUP command. BACKUP prepares real copy of your data and programs
present on the hard disk. If, for any reason, the original file gets currupted, you can
retrieve the destroyed data and programs by using its copy.
BACKUP command can only copy from harddisk to floppy disk. It can't be vice versa. The
data previously recorded on the floppy disk is semoved by it. This command is executed
through BACKUP.EXE program. If you have a hard disk the program should be in C drive.
If there is no hard disk, we can use the floppy with BACKUP.EXE program.

 If you want to backup all the files into A drive from DOCS directory of C drive,
give the following commands.

C:\> BACKUP C:\DOCS A: 

After inserting floppy in A drive press any key.
 Because of A: the copying will be done on the floppy of the A drive.
 If the space available in the floppy ends before all the files are copied, the

program will ask you to insert a blank floppy.
Therefore, remember to have blank floppies with you as per the requirement for
backup.
All the files of the directory as well as all of them from the sub-directory can be
copied. For that, type the following command :

C:\> BACKUP C:\DOCS A:\S 

 Here, the copying will be done in the floppy of A drive.
 Here not only the files of the DOCS directory will be copied, but a sit also

it has a sub-directory, hence all the files of it will also be copied, such as-
DOCS\YEAR1, DOCS\YEAR2.
 The files of sub-directory are copied because of /S.
Backup can be done only from Hard Disk to Floppy Drive.
MODE COMMAND
MODE command is an internal command and its use startecd from 2.00 version of
DOS. MODE command is used to control different outputs of the computer. The utility
of this command has come down because of the development of Windows Operating
System. Different options of MODE command have been given in the following table.

Fundamentalsof Command Function
Computers & MODE 40 displays 40 characters in each row.
Information Technology MODE 80 displays 80 characters in each row.

NOTES MODE BW40 displays 40 characters in each row in
monocrome form.
226
M ODE BW80 displays 80 characters in each row in
MODE C040 monocrome form.
displays 40 characters in each row in color.

MODE C080 displays 80 characters in each row in color.

Table 12.7 : Options and Functions of MODE Command

ATTRIB COMMAND
ATTRIB being an external command, is used to attribute some features, like using this
command you can make a file hidden or set into read only form. The syntax is -

C:\> ATTRIB < Filename> < switch> 

For example, suppose you want to make a file named RAJ hidden, do this -

C:\> ATTRIB RAJ/+ H

After having executed this command, you can not find the above file using DIR
command as it has been made hidden.

Some other switches are as follows -

–H – To turn the file back into the normal mode.

+R – To set the file into read only mode.

–R – To turn the file back into the normal form.

–H – Cancels the hidden attribute of the file and it is seen again in the
displayed list.

HELP COMMAND

HELP command was used in 5.00 version of DOS and was extended in 6.00 version.
In both the versions, HELP command displays information regarding the given com-
mand. Its format is-

HELP < Command Name>

Example :

HELP DIR

After executing the above command, DOS displays. Information related to DIR on the
screen. It can be brought to use in the following ways -

DIR / ?

SYS COMMAND

SYS command is an external command which is available in all the versions of DOS.
This command transfers the system files in the mentioned destination. Its normal format
is-

SYS < name of the destination drive>

Example.

C:\> SYS A:

After a few seconds of the command is executed a message "System transferred" is
displayed which informs the successful completion of the process.

EXECUTABLE Vs NON-EXECUTABLE FILES IN DOS

In DOS we come across several types of files whose nature is known to us through

their extensions. There are some files which run a specific instruction in the computer Disk Operating System
and they complete a specific function in DOS. In fact, all the commands of DOS are NOTES
kinds of files which are used to accomplish a specific task. The executable files in DOS
are those which are given extension. EXE (executable), .COM (command). .BAT (batch). Check Your Progress:
To execute these files, their extension needn't be given on DOS prompt. 5. Defi ne DEL T REE
In contrast, non-executable files are those which are not executed on DOS indepen-
dently, but these files are executed with the help of executable files. The extensions Command.
of these files may be .DAT, .DOC, .TXT etc. 6. What do you know about

SUMMARY CHKDSK Command?
7. What ar e t he pr i mar y
 MS-DOS is an acronym for Microsoft Disk Operating System.
 DOS works as an interpreter that establishes a link between hardware and funct i on of APPEND
Command?
software 8. What are the basic differ-
 DOS offers two types of commands. They are internal and external. ence between executable
 Internal commands are always available with DOS as these commands are and non-executablefile in
DOS?
automatically stored in memory at the time of booting.
 External commands are short programs which are stored either on floppy disk 227

or hard disk and if required be, these are executed and stored in the
memory.
 DIR Command is used to view listing of the directories and files.
 DIR/OD lists the directories and files age-wise in an older to newer order.
 DIR/ON lists the directories and files in an alphabetic order.
 COPY command is used to make duplicate copy of a file.
 Question mark wild card is used to represent one character in the name.
 Star wild card is used to represent a group of characters in the name. For
instance, .exe represents all the files those have exe extension.
 REN command is used to rename a file.
 COPY CON command is used to create a file and its contents.
 Batch file is an executable file in DOS. Its extension name is .BAT. It is
mandatory to write the extension at the time of creating a batch file.
 MD and MKDIR are the commands used to create a directory.
 CD and CHDIR are the commands used to change the current directory.
 RD and RMDIR are the commands used to remove the current directory,
provided the directory is empty.
 MOVE command is used to rename a directory.
 FORMAT command is used to format a disk.
 CHKDSK command is used to get information about the space available in
the disk and memory.
 DISKCOPY command is used to create duplicate copy of a floppy disk.
 ATTRIB is an external command used to change the attributes of a file.

ANSWER OF THE CHECK YOUR PROGRESS :

1. Disk operating system isa non-graphical textual user interface operatingsystem.
MS-DOS is an acronym for Microsoft Disk Operating System. This is the most

Fundamentalsof popular operating system of thissort, used in microsoft computers.
Computers &
Information Technology 2. Internal Commands–These commandsare alwaysavailable with DOSbecause
these commandsare automatically stored in the memory at the time of booting.
NOTES All these commands are collected in COMMAND.COM program file. Hence
these commands are always available, until we switch off the computer.
228
3. External Commands–External commands are short programs which are stored
either on floppy disk or hard disk and if needed, they are executed and stored
in the memory. The examples of External commands are– FORMAT, CHKDSK,
PRINT, DISKCOPY etc.

4. MD command and MKDIR command, both are used to serve the same
purpose. These are internal commands. These are used to make Application
Directory or Sub Directory.

5. DELTREE Command–This command is used to delete all the contents of a file
together at a time. For example, a directory named MAN contains several sub-
directories and files. To delete the entire directory MAN with all its contents
type the following command on your screen.

C:\> DELTREE MAN 

This command is highly sensitive.

6. The CHKDSK command–This command is used to get information about the
available space in the disk and memory. It is also used to correct the disorder
in the data-structure.

 To do this, use the following command :

C:\> CHKDSK 

7. When used alone, APPEND command, shows the list of the path of the ap-
pended file. After this command is given, if no appended path is available, it
releases No Append message.

8. The executable files in DOS are those which are given extension. EXE (ex-
ecutable), .COM (command). .BAT (batch). To execute these files, their exten-
sion needn't be given on DOS prompt. In contrast, non-executable files are
those which are not executed on DOS independently, but these files are ex-
ecuted with the help of executable files. The extensions of these files may be
.DAT, .DOC, .TXT etc.

EXERCISE

1. What is Microsoft DOS ? Explain its functions.

2. What are DOS commands ? Give two examples of each.

3. What are internal commands in DOS ? Name any four internal commands.

4. What are the external commands in DOS ? How are they different from
internal commands? Name any two external DOS commands.

5. What is the use of AUTOEXEC.BAT file in DOS ?

6. Write the process of creating a batch file. Disk Operating System
NOTES
7. Mention all the commands that help in displaying lists of files and directories
in various ways. 229

8. What can be done using DIR command ?

9. What is the difference between COPY and COPY CON commands ?

10. What is the extension of a Batch file ?

11. Tell the use of CD and CHDIR command.

12. Differentiate between the functions of MOVE and REN commands.

13. Explain the differences between the functions of DISKCOPY and DISKCOMP.

14. What is the use of TREE/F command ?

15. What is LABEL command ? In which version of DOS was it introduced ?

16. Which command is used to remove a file from a list ?

17. Explain the similarities and differences between APPEND and PATH command.

18. Illustrate SORT command.

19. What is the difference between LABEL and VOL command ?

20. Explain MODE command in detail.

21. Write the process of BATCH file creation.

22. How does DIR/P display the list.

23. Write the differences between the executable and non-executable files.

23. Write functions of the following commands -

(a) DIR * .EXE (b) MKDIR

(c) VER (d) DELTREE

(e) ATTRIB (f) REN

(g) CHKDSK (h) TREE

(i) XCOPY (j) DISKCOMP

(k) COPY (l) VOL

(m) PATH (n) PRINT

(o) DISKCOPY (p) MODE

LAB WORK

ASSIGNMENT-1

Question : An Editor of a magazine maintains various types of details for his maga-
zine. He keeps all data organized in directories named after the columns.
He keeps his articles in adirectory named EDITORIAL, Jokes and anec-
dotes in HUMOUR, and all the rest in OTHERS. He makes sure that Jokes

are not mixed with anecdotes. Prepare the respective directories for the
editor.

Solution :

First of all, we structure the directory in accordance with the question. Since there is
no name given for the magazine in the question, we will keep the name of root
directory as MAGAZINE. Now, we will geate directories like the following structure

:

Fundamentalsof MAGAZINE
Computers & EDITORIAL
Information Technology HUMOUR
JOKES
NOTES ANECDOTES
OTHERS
230
According to the above structure directories can be created following the steps as
mentioned below-

C:\> MD MAGAZINE

C:\> CD MAGAZINE
C:\MAGAZINE> MD EDITORIAL
C:\MAGAZINE> MD HUMOUR
C:\MAGAZINE> CD HUMOUR
C:\MAGAZINE\HUMOUR> MD JOKES
C:\MAGAZINE\HUMOUR> MD ANECDOTES

C:\MAGAZINE\HUMOUR> CD..
C:\MAGAZINE> MD OTHERS
C:\MAGAZINE> CD..
C: \>
Explanation :

Line No. 1 : First of all, MAGAZINE directory created.
Line No. 2
Line No. 3 : Entered into MAGAZINE directory using CD command.
Line No. 4
: Sub-directory named EDITORIAL created in MAGAZINE directory.
Line No. 5
Line No. 6 : Then, created one more sub-directory named HUMOUR in MAGA-
ZINE directory.
Line No. 7
: After that, entered into sub-directory HUMOUR.
Line No. 8
Line No. 9 : After entering into sub-directory HUMOUR, another sub-directory
Line No. 10 named JOKES has been created.

: Then, created a sub-directory named ANECDOTES under HUMOUR
sub-directory.

: Now, get back to MAGAZINE from HUMOUR.

: Then, one more sub-directory created namely OTHERS.

: After that, come back to C prompt using CD..

ASSIGNMENT-2
Question : Copy the files from directory AUTHOR of BOOK section into EDITORS

directory called OTHERS.

Solution :
To copy the files from sub-directory AUTHOR of directory BOOK to the sub-directory
of OTHERS directory, do like this first -

C:\> CD BOOK 

Then, go to sub-directory Author of Book directory like this -

C:\BOOK> CD AUTHOR  Disk Operating System
NOTES
After that, your prompt appears like this -

C:\BOOK\AUTHOR>

Here, use COPY command as follows -

C:\BOOK\AUTHOR> COPY * .* C:\OTHERS\EDITORS 

The above command copies all the files available in AUTHOR sub-directory to the sub-
directory EDITORS of OTHERS directory. You can see it in Figure 12A.1.

Figure 12A.1 : Result of COPY command on DOS

ASSIGNMENT-3
Question : Remove the files that are more than one year old. You can make a list of

file names on paper.

Solution :
To do this, we arrange the list according to the dates in older to newer order using the
following commands -

C:\> DIR/OD

Figure 12A.2 : List of files in older to newer order 231

The result of the command can be seen in Figure 12A.2. As you can see, the command
has displayed the files from older to newer. You can invert the list means you can display
the files from newer to older order using the following commands-

C:\> DIR/O-D

Fundamentalsof The output should be one as in Figure 12A.3.
Computers & Now, note down the files on a paper which are older than one year and start deleting
Information Technology one by one using this command -

NOTES C:\> DEL < filename>
Example,

DEL JOKE1

232


Click to View FlipBook Version