0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
63 visualizzazioni32 pagine
MS DOS is an important operating system for IBM PCs that controls all computer activities like loading programs into memory, transferring files, accepting keyboard input, and displaying output. It includes commands for viewing directories, changing disks and directories, creating and deleting files and folders, and setting the computer's date and time. DOS commands have an internal structure of a command name followed by optional parameters and switches to specify options.
MS DOS is an important operating system for IBM PCs that controls all computer activities like loading programs into memory, transferring files, accepting keyboard input, and displaying output. It includes commands for viewing directories, changing disks and directories, creating and deleting files and folders, and setting the computer's date and time. DOS commands have an internal structure of a command name followed by optional parameters and switches to specify options.
MS DOS is an important operating system for IBM PCs that controls all computer activities like loading programs into memory, transferring files, accepting keyboard input, and displaying output. It includes commands for viewing directories, changing disks and directories, creating and deleting files and folders, and setting the computer's date and time. DOS commands have an internal structure of a command name followed by optional parameters and switches to specify options.
Disk Operating (DOS) System is most important software for IBM
personal computers (PC) or compatibles. Like any other operating system, DOS controls all activities of a computer. It decides : where in memory to load any programs, transfers files from hard disk to memory, accepts data from keyboard, displays information on the screen, handles printing and so on. There are two main types are DOS operating systems available for use : MS-DOS and PC-DOS. Both are developed by Microsoft corporation. PC-DOS was developed specifically for IBM PC. Microsoft still owns PC-DOS and earns large amount of royalty fees from IBM. MS-DOS is very similar to PC-DOS but Microsoft sells it to IBM clone manufacturers or directly to customers. Both MS-DOS and PC-DOS are very similar. When we switch on the computer, the computer will try to find DOS. It checks disk drive A first (you may notice the light glow of drive A) although the DOS installed in disk drive C (hard disk). After the disk drive C is accessed and searched. If DOS is found, it is loaded automatically in to the memory (RAM). This process is called booting up. Now you will see the DOS command prompt as follows : C> _ Alternately your computer may booted up to Microsofts Windows operating system if it has been set up in your system. In such case you can boot up MS-DOS from Start menu and then from Programs. Now also you will see the DOS command prompt as follows : C> _ DOS Basic Commands : All DOS commands have a structure or a format. Each command is made up of up to three parts. Command, Parameters, Options or switches. For example, consider following DOS command : C> dir a : / w Here, dir is the command part, a : is the parameter, and /w is the option or switch part. The parameter a : indicates that you want to see the files in the disk in A drive. The /w switch will display the directory in wide format, occupying up to five columns. I. Commands for Displaying Directory :- The DIR command can be issued in number of formats given bellow : DIR DIR A: DIR /P DIR A: /P DIR /w DIR A: /w To read a pure text file (also called ASCII file) of name say aithal, type : C> type aithal.txt II. Changing disk drives :- To access another disk drive, type the letter designated to represent the drive followed by a colon. For example, to access the A floppy disk drive, type : C> a: Ensure that you have inserted a floppy disk into your drive A before accessing it. To access the C drive (hard drive), type : A> c: III Making the Directory :- For creating a new directory type the command as C:\> MD BOOK This will create new subdirectory by the name BOOK. IV. Changing the Directory :- In DOS operating system, the main directory (say c) is called the root (represented by a backslash \ symbol) and all other directories are sub-directories. A sub-directory from the root can also have other sub-directories and so on. ( This is exactly like folders, sub-folders in windows operating system.) For example, C> cd \ accounts This changes the directory to accounts which exists directly under root. C> cd \ accounts \ feedata This changes the directory to feedata which exists under accounts. Note that the whole path needs to be specified. The following command changes the directory to the root : C> cd \ The CD command is a short version of CHDIR command, standing for Change Directory. DOS hierarchy is : Drive -> Directory -> Sub Directory -> File name For example, C:\letters\personal\raju.txt V. Changing Computer Date and Time : You can change or set correct date and time on your PC or just check it ! by typing : C> date Then the system will display the current date as follows : Current date is Tue 21 02 2003 Enter new date (dd-mm-yyyy) : _ To reset the date to 4 th March 2003, type : 04 02 2003 If the date is correct and you dont want to change it, just press the Enter key. To check the current time type : C> time The computer may display : Current time is 10 : 37 : 29.56a Enter new time :_ To set the new time to 3.45 p.m. say, type : 15 : 45 Since, the computer has 24-hour clock, you have to do so. You need not change the second and hundredth of the second. DOS versions : If you dont know which version of DOS you have installed on your computer, just type : C> ver Now DOS will tell you whether its version is 2.0, 2.1, 3.1, 3.2, 4.0, 5.0, 6.0, 6.2 etc. Clearing the Screen : To clear the screen quikly (!) type : C> cls Now whole screen will clear. Help on a DOS command : For DOS version 5 and above, you can use the HELP command followed by DOS command to obtain information on how to use specific command (including the parameters and options you can use). For example : C> help dir or dir / ? Help on its own will display all commands alphabetically. Root Directory : When you are in a directory say C, to open a file or sub-directories from that directory, press / . Here / represents root directory. The Prompt Command : When you are moving around different directories at the command prompt, it is difficult to know which directory / subdirectory you are using at a time. To solve this, the PROMPT command can be used to change the DOS command prompt and give you this information. For this type : C> prompt $p$g This changes the command prompt to display current directory too. For example, when you are at the root directory, the command prompt will look like : C : \ > The \ again indicating that it is the root directory. If you change to aithal directoary, the command prompt changes to : C : \ aithal > Changing the directory again to PERSONAL will show : C : \aithal \ PERSONAL > IV. Internal and External Commands : There are two types of DOS commands that you can issue at the DOS command prompt : Internal and External. Internal commands include : COPY, DEL, DIR, TYPE, COPY, MD, CD, DATE, TIME, CLS etc. These commands can be issued from any disk drive or directory. because they are in the computers memory (RAM). IV. Internal and External Commands : External commands, are not residing in the memory RAM. They resides as separate files on hard disk; one for each command. When you issue an external command, the relevant file has to be located and loaded into memory from disk just like when you want to run a program. Examples for external commands include : BACKUP, CHKDSK, FORMAT, UNDELETE, DIDKCOPY, MOVE etc. VI Basic File Commands : 1. Naming MS DOS Files : A DOS file name is divided into two parts : * The file name, which identifies the specific contents of a file. * An optional extension, which identifies the type of the contents. For example : srinivas.txt Book.EXE VI Basic File Commands : 1. Naming MS DOS Files : Rules for file name : (1) The file name can not exceed 8 characters in length (1-8 characters). (2) The extension portion can not be more than 3 characters (0-3 characters). (3) You have to use a period to divide the file name from extension. (4) You can not include a blank space in either the file name or extension portion. (5) A file name and name extension can contain alphabet, as well as numbers and they can start with alphabet or number. (6) You can not use certain characters like / \ [ ] ! < > + : = ; ? (7) A file name can not contain more than one period symbol. (8) A file can not have same name as another file in the same directory. (9) A file name can not be from following reserved words. These words have special use for the DOS. These are AUX, COM, CON, LPT, PRN. File name extension for different software are as follows : 1. BAK - Back-up file, when a file is saved after some change, old file is renamed with .BAK extension 2. BAS - Basic language programs. 3. BAT - DOS Batch files. 4. BIN - Binary files. Files that contains instructions to computer. 5. CDR - Coreldraw files 6. CHK - File created by DOS CHKDSK command. 7. COM - Command file, a file contain instructions for DOS execution. 8. DAT - Data file. 9. DBF - Data file created by DBase program. 10. DBT - Data file created by DBase program. 11. DLL - Dynamic Link Library, files that contain instruction for computer, used by Windows program. File name extension for different software are as follows : 4. DOC - Document files, contain text. 5. EXE - Executable file, instructions executed by DOS. 6. FNT - Font file. 7. GIF - Graphic Image File. 8. HLP - Help file. 9. LBL - Label file, created by dBase program. 10. NDX - Index file for data, created by dBase program. 11. OVL - Overlay file. Files that contain instruction for computer. 12. PIF - Program Information file, used by Windows. 13. PRG - Program files contains dBase program. 14. SYS - System files, used by DOS, contain instruction for computer. 15. TIF - Tagged Image Information File, image files. 16. TTF - True Type Font file, font file used by Windows 17. TMP - Temporary file used by many programs. 18. WK1 - Spreadsheet file, used by Lotus 1-2-3 program. 19. ZIP - File compressed using the PKZIP program. 20. $$$ - Temporary file created by many programs. 1. To see a Directory : Type DIR *. * on command line. This will list all the file contained in that directory. If you type DIR * .EXE on command line, all the files with extension EXE will be listed. If you type DIR A *.* on command line, all the files beginning with A will be displayed. 2. Copying just one File : Using the COPY command you can easily copy a file. For this you want to know the name of the file and where you want to copy it to. For example, to copy a file named srinivas.txt from your hard disk C to a floppy disk A, type : C> copy srinivas.txt a: This assumes that you are issuing the COPY command from the appropriate directory in your C disk. If you are not in that directory, prefix the filename with the correct path : C> copy c : \ aithal \ teaching \ srinivas.txt a: The path can also be specified on the other side (the destination side) of the command. For example, C> copy c : \aithal \ teaching \ srinivas.txt b : \ mis 3. Formatting a Disk : Type FORMAT Disk Name. For example, C:\> FARMAT A: This will format the floppy inserted in Drive A. 4. Assigning Label to a Disk : To label a disk after formatting and storing some files following command can be used : C:\> label a: ACCOUNTS_2000 5. System Disk Formatting : While formatting a disk, it is possible to copy the main DOS system files to it too. For this : C:\> format a: /s The system program will be copied in formatted floppy disk. If you want to copy entire system DOS program to a already formatted floppy, use following command : C:\> sys a: The above command is same as /S option on the FORMAT command. 6. Duplicating a Disk : To duplicate a disk from drive A (source) to a disk inserted in drive B (target), type : C :\> diskcopy a : b : If you only have one disk drive and you want to duplicate a disk, type : C;\> diskcopy a : a : First insert source disk and then the target disk. 7. Comparing Disks : If you want to compare the content of two disks after DISKCOPY operation, use DISKCOMP command. C> diskcomp a: b: For DOS version 5 and above, instead of DISKCOMP, after DISKCOPY, type following single command. C> diskcopy a: b: /v 8. Working with Hard Disk : For formatting hard disk type on command line C> format C: For checking disk (status of files and directories) type C> chkdsk To compress the disk to increase the disk space (only in versions 6 and above) you can use Double space command. C> dblspace For scanning the hard disk, to analyze and repair problems, C> scandisk C: 9. Moving files : To move a file from one directory to another : C> move myfile.doc \ windows Here, Myfile.doc will move from the current directory to the windows directory. If file with same name exist in that directory, it will be over-written. 10. Renaming Files : To rename the file without making a copy of it, use REN command : C> ren aithal.txt aithal.new First filenametyped after REN will be renamed as second filename. You can use wildcards to rename several files C> ren *.txt *.old All files in the current directory ending with .txt will be renamed with a new file extension, .old. 11. Deleting Files : To delete files use either DEL or ERASE commands. C> del srinivs.txt To delete all the files in that disk use wildcard C> del *.* 12. Undeleting Files : To undelete the deleted file, use UNDELETE command. C> undelete srinivas.txt By typing undelete /list, one can list the list of all files that can be recovered. C> undelete / list C> undelete /all This will recover all deleted files. 13. Printing Files : To print a text file from DOS, type : C> print srinivas.txt Another easy way to print text files is to use the COPY command : C> copy srinivas.txt prn This will copy the srinivas.txt file to your printer, designated by prn.