Wednesday, 30 January 2013

Operating System - DOS

Operating System - DOS

Q.1. What is Operating System? Explain its function.
Ans.: An operating system provides a uses interface, through which a user interacts
with a computer. If acts as a resource manager for the computer, and allocates
resources to the user.
Q.2. Describe the commands in DOS? Name the commands with their syntax.
Ans.: DOS commands are small programs, which are made to perform a particular job.
Every DOS command performs different task. It is not possible to work on the
computer without these commands. There are two types of DOS commands –
(1) Internal Commands
(2) External Commands
Internal Commands : These commands enter into the computer memory during
computer booting. These commands are not in the form of any file; so neither
they can be viewed nor can be edited or detected. For example : MD, CD, TIME,
DATE, COPY, COPR CON, TYPE ETC.
External Commands : These commands are stored in the computer list in the
form of files. These Commands can be viewed, copied, changed or deleted. For
example : FORMAT, COPY, PRINT, SYS, EDIT, TREE, SORT, PROMPT etc.
Important Internal DOS Commands :
(i) MD (Make Directory) : We use this commands to make a new directory
or sub directory.
Syntax : e:1>MD DIRECTORY NAME ↔
Example : MD STUDENT ↔
(ii) CD (Change Directory) : This commands is used to move from one
directory to another.
Syntax : C:\> CD Directory name ↔
Example : > CD Student ↔
Exit to Directory :
CD… - The command move the subdirectory to parent directory.
CD\ -The command is used to move directly to the root directory.
CHAPTER-5
For more detail: - http://www.gurukpo.com
(iii) RD (Remove Directory) : If a Directory which was earlier is ;not required
than such directory can be removed by using syntax :
C:\> RD Directory name ↔
Example : >RD student ↔
Note : (a) The directory, which is to be removed, must be empty.
(b) The directory in which one is working cannot be removed.
One has to close the directory and come to the parent
directory to remove that directory.
(iv) Copy Con : Its command is used to create a file. The name of the file,
which is to be created, is written after the copy Con leaving one space in
between syntax :
Copy Con file name ↔
-------------------------------
-------------------------------
To created a file, the following steps are :
(i) Type Copy Con Monu and press Enter.
(ii) Type whatever is to be typed in the file.
(iii) Press F6 function key or CTRL + Z keys ‘ΔZ’ will be displayed on
the screen, which indicates that the file is complete.
(iv) Press Enter and after that the DOS will save the file and will
display the message ‘1 File(s) copied.
(v) Del : This command is used to erase the files which are no longer
required.
Syntax : C:\> Del < File name >
Example : >Del Monu ↔
(vi) Type : This command is used to view the contents of text file.
Syntax : Type <file name>
(vii) Copy : This command is used to copy of file from one place to another
place. A copy of file is another file with the same contents.
Syntax : C:1> copy <source> < destination path>
(viii) Ren : This command is used to rename the file. In REN command two
parameters are used. The first is the file we want to rename and the
second is the new name for the file.
Syntax : > Ren <old file name> <New file name>
For more detail: - http://www.gurukpo.com
(ix) DIR : This command is used to display of directory and files.
Syntax : C:\> DIR ↔
(x) CLS : This command is used to clear the screen.
Syntax : Cl\: CLS ↔
Q.3. Differentiate between File and Directory.
Ans.: All the data on our hard drive consists of files and folders.
The basic difference between the two is that files store data, while directory store
files and other sub directory. The Directory, often referred to as directories, are
used to organize files on our computer. The directory themselves take up
virtually no space on the hard drive. Files, on the other hand, can range from
few bytes to several gigabytes.
Q.4. What is ‘Wild Card’? Explain.
Ans.: Wild cards are symbols that let your reference groups of related files. DOS wild
cards are the “*” and “?”.
The asterisk (*) – The asterisk takes the value of any number of characters.
The Question Mark (?) – The question mark matches any single character.
Practical Questions :
I. Make Directories in the following structure using DOS commands :
INDIA
Delhi Rajasthan Punjab
Jaipur Sikar Chandigarh Patiala
a) Make a file named Tourist and type names of any three tourist place in
Jaipur directory.
b) Make a file named Tourist I and type names of any one tourist place in
Chandigarh directory.
c) Make file named RedFort.LTxt and Chandnichowk.Txt. in Delhi directory
(Type same text in these files).
d) Copy Redfort Txt in Sikar directory.
e) Rename Sikar directory as New Delhi.
f) Remove Patiala directory.
g) Delete file name Redfort.Txt.

No comments:

Post a Comment