Saturday 5 October 2013

Microsoft Disk Operating System ( MS-DOS)

Operating System:-
Operating System is also called system software. An operating system (OS) is the main control program of the computer that manages all other program in a computer. The other programs commonly referred to as ‘Application Program’, use the service provided by OS through a well-defined Application Program Interface (API). Every computer necessarily requires some type of operating system that tells the computer how to operate and utilize other programs installed on the computer.The operating system installed on hard disk before any other software, which acts as an interface between a user and the hardware. The role of an operating system in a computer is similar to the role of a principal in a college who is responsible for the overall management of the college.


Ex- DOS, Windows 95/98, Windows NT, UNIX, Linux etc. 

Microsoft Disk Operating System:- 
MS-DOS is an operation system which full depend on the command. It is the first operating system. It also called command based operating system. In DOS we directly work on the Hard Disk.
MS-DOS is a single user, single tasking operating system. DOS has a command-line, text based/non-graphical user-interface commonly referred to as Character Based User Interface (CUI).
The DOS prompt known as the command prompt looks like C:\> or D:\> or E:\> where ‘C’,’D’,’E’ represent the hard disk drives of the computer system. All the commands are typed at the DOS prompt. Enter key is pressed to view the output of the typed command. If the command is correctly typed desired output would be displayed. Otherwise an error message (bad command or file name/Invalid parameter) is displayed on the screen.
Note:-  All DOS commands are case-insensitive.
"MS-DOS was introduced in 1981 in jointly by Microsoft and IBM 
 (International Business Machine)".
Command:-     A set of instruction which perform a task is called command.
 There are two type of command.
1-Internal Command                        2-External Command
1-Internal Command:-Internal commands are memory residence commands, these commands automatically loaded on the memory when computer is start. These commands packed with command.com file.
Ex- md, cd, cd.., copy con etc.
 2-External Command:-External commands are those command not memory residence command. When computer is start these command are not loaded in the memory. When we use the external command, firstly call them with a specify path (address).
Ex- Format, chkdsk, tree, deltree, fdisk, etc.
Booting:- 
When we starting the computer take few seconds to ready for work. The time between start and perform the work is called booting time. In booting time the hard disk of computer loaded some system file into RAM. There are two types of booting.
1-Warm booting (Ctl+Alt+Del):- Restarting PC without switching off the power is called warm booting.
2-Cold booting: - Sometimes, warm booting does not work. It that case, you have to 
Switch-off, and then it on to boot again. This is called cold booting.
How to start MS-DOS:-
Start > All program > Accessories > command prompt    OR
Start > Run > “cmd”                        OR
Start > Run > command
Folder or Directory: - Which contains files and directory called directory. We can not type any message in directory, but we can store them.
Files: - Which can contains the written messages called file.
Drive:-Logical partition of secondary storage device (Hard disk) called drive.
Sub directory:- When a directory store another directory then this types of directory called sub-directory and which directory contains sub directory called root directory.
            DOS COMMAND
Note:-Underscore( _ ) Indicates the space & Arrow ( ← ) the pressing of Enter 
1-MD:-Make directory-To create new directory.
Syntax: - C:\>md _directory name ←
Ex:- C:\>md_srv 
2-CD: - Change directory (Active directory)-Enter the directory.
Syntax:-C :\> cd_ directory name←
Ex:- C:\>cd_srv 
3-DIR:-To show all the file and directory.
Syntax: - C:\>dir←
4-CD.. :- To exit from an active directory.
Syntax:-C :\> cd..←
Ex- C:\>India>UP>Varanasi>Basahi>SRV>cd..
C:\>India>UP>Varanasi>Basahi>cd..
C:\>India>UP>Varanasi>cd..
C:\>India>UP>cd..
C:\>India>cd..
C:\>c drive or c prompt or root directory
4.1-Tree- To show all files and sub-directory of a root directory in tree format.
Syntax- C:\>tree_root directory name ←
5-CD\:-To exit from all active directories.
Syntax:-C :\> cd\←
Ex-C:\>India>UP>Varanasi>Basahi>SRV>cd\
C:\>C drive or c prompt or root directory
Make the directory of the following structure

C:\>md_Computer 
C:\>cd_Computer 
C:\>Computer>md_Hardware 
C:\>Computer>md_Software 
C:\>Computer>cd_Hardware 
C:\>Computer\Hardware>md_IO 
C:\>Computer\Hardware>md_CPU 
C:\>Computer\Hardware>md_Storage 
C:\>Computer\Hardware>cd.. 
C:\>Computer>cd_Software 
C:\>Computer\Software>md_System 
C:\>Computer\Software>md_Application 
C:\>Computer\Software>cd\ 
C:\>Tree_Computer 

6-CLS (clear screen):-To clear the DOS screen
Syntax:-C :\> cls
7-Exit:-To exit from MS DOS
Syntax:-C :\> exit←
8-DATE:-Displays system’s current date and prompts to enter the new date.
Syntax:-C :\> date←
Ex-The current date is: Mon 06/28/2010
Enter the new date : <mm-dd-yy>……………….
9-Time:-Displays the system’s current date and prompts to enter the new time.
Syntax-C :\> time←
Ex-Current time is 12:55:28.8
Enter the new time:………………..
10-ver:-To show system current version (operating system).
Syntax-C :\> ver←
11-To change disk prompt or drive.
Syntax-C :\> drive: ←
Ex-C :\> d: ←                       D :\>
12-Prompt:-To changes the MS-DOS prompt to the specified text. If the command is typed without any parameters then the default prompt setting is restored.
Syntax-C :\> Prompt_ any name (text)
Ex:- C:\>Prompt_Preeti
Preeti                   ( C Prompt Change into Preeti )
Change the prompt to the default setting.
Ex:-Preeti _Prompt←
C:\>                   ( Set the default prompt )
OR
Ex:- Preeti_Prompt_$P$G 
C:\>                  ( Set the default prompt )     
13-Format: - To remove all the data from a drive.
Syntax-C :\> Format_ drive name←
Ex-C :\> Format_ d: ←
14-Mem (Memory):- To check the memory of computer.
Syntax-C :\> mem←
15-CHKDSK:-To check errors of computer. (Windows Xp)
Syntax-C :\> CHKDSK←
16-SCANDISK: - To check errors of computer. (Windows 98)
Syntax-C :\> SCANDISK←
17-Color 100:-To changes text or background color. (Windows Xp)
Syntax-color_100 
Ex-C :\> color_d1←
18-Copy con: - To create new file.
Note:- In DOS, CON refers to the Console (Keyboard and Video Monitor).
Syntax-C :\> Copy_ con_ file name
Ex-C :\> Copy_ con _ Preeti←
Note:-Ctrl+Z OR F6 ← (For save the file)
19-Type: - To open the file.
Syntax- C:\>Type_file name←                OR
Syntax-C :\> Copy_file name_con←      OR
Syntax-C :\> more_file name←
20-Ren (Rename):-To change the name of a file.
Syntax-C :\> Ren_old file name_New file name ←
20.1-Move:-The move command is used to move files from one directory to another or to rename directories.
Syntax- C :\> Move_ source file _destination←
Ex- C:\> Move_Preeti.txt_D:\Payal.txt
21-Edit: - To modify the contents of a file.         (Mouse is worked)
Syntax-C :\> Edit_ file name ←
Note: -Alt+F+S=Save          Alt+F+X=Exit
22-Del (Delete):- To delete file from memory.
Syntax-C :\> Del_file name ←
23-Copy: - To copy the contents of one file to another file.
Syntax:-C :\> copy_source file_destination file ←
Ex-C :\> Copy_Preeti_D:\Payal←
24-XCOPY:-It is same as copy command but faster than copy command. It copies files and directories to the specified location.
Syntax-C :\> XCOPY_source_destination ←
Ex:- C:\>XCOPY_C:\Computer_D:\Computer /S/E
Note:- /S  Copies directories and sub-directories except empty ones.
            /E  Copies directories and sub-directories, including empty ones.
25-DELTREE:-It is used to delete all files and sub directories of the root directories.      (Windows 98)
Syntax-C :\> Deltree_root directory name ←
26-RD (Remove Directory):- To delete empty directory from memory.
Syntax:-C :\> RD_empty directory name ←
27-Attrib+H:- To hidden a file.
Syntax-C :\> Attrib_+H_file name ←
28-Attrib-H:- To show the hide file.
Syntax-C :\> Attrib_-H_file name ←
29-Attrib+R:- To make a file in read only mode. (You can modify file)
Syntax- C :\> Attrib_+R_File name ←
30-Attrib-R:- To make a file in read & write form.
Syntax- C :\> Attrib_-R_File name ←
31-FC (File compare):- Compares two files or sets of files, displays the difference between them.
Syntax- C :\> FC_File1_File2 ←
32-DIR/P:- To show all files and directories with page wise.
Syntax-C :\> DIR/P ←
33- DIR/O:- To show all files & directories in ascending order.
Syntax- C :\> DIR/O ←
34-DIR/W:- To show the files and directory in column wise and directories display in ‘[‘and’]’.
Syntax- C :\> DIR/W ←
35-DIR/S:-To show all files and directories, sub-directories of a root directory.
Syntax- C:\>DIR/S ←
36-Ctrl+C:- To break the process of MS-DOS.
37-DIR P *.**  :- To show all files and directories which first letter is “ P”.
Syntax- C :\> DIR_P*.** ←
38- DIR *.txt:-To show all files which extension is ‘.txt’.
Syntax- C :\> DIR_*.txt ←
39-DIR/AH:- To show all hidden files and directories also.
Syntax- C :\> DIR/AH ←
40-DIR/AD:- To show only directories.
Syntax- C :\> DIR/AD ←
41-DIR/A-D:- To show only files.
Syntax: - C :\> DIR/ A-D ←
To know about more command you can use help command.
Ex:- C:\>help
         C:\>help_xcopy
Wild Cards:-
Wild characters can be used in specifying (searching) file names in DOS.
There are two types of wild cards (?,*).
         It is used to searching for one unknown character files.
Syntax- C :\> DIR BA?.txt ←
Displays all the text files in the C: drive starting with ‘BA’ and ending any single character.
Ex- BAT.TXT, BAG.TXT, BAR.TXT, BAD.TXT etc.
*          It is used to searching for one or more unknown character files.
            Syntax- C :\> DIR/CON*.TXT ←
Displays all the files in the C: drive starting with ‘CON’.
Ex- CONCETP.TXT, CONCATENATE.TXT, CONTEMPT.TXT, CONSOLE.TXT etc.
Batch File:-
A batch files is a simple text file that contains a series of DOS commands. It can help you to run a series of DOS commands without requiring your attention. The extension of batch files is .BAT.
Creating and Running a Batch File:-
Syntax:-
C :\> Copy_con_flower.bat
Date
Time
Ver
Ctrl+Z ←                   1 file (copied)
C:\>flower.bat ←
Press enter key, all the commands will be run step by step.
Some other Utility Command
To Create a User Account:-
Syntax:- C:\>Net_User_Username_Password_/add
Ex:- C:\>Net_User_MCMT_123_/add
To Delete a User Account:-
Syntax:- C:\>Net_User_Username_/delete
Ex:- C:\>Net_User_MCMT_/delete
Ping:- Shows how long it takes for packets to reach host & DNS Lookup.
C:\> ping_www.facebook.com