قسم ھندسة السیطرة و النظم مادة البرمجة/ المحاظرة الاولى المرحلة الاولى مدرسة المادة صبا طارق سالم 2010/2011 1
1.Introduction to MS-DOS : MS-DOS (Microsoft Disk Operating System) was the Microsoft-marketed version of the first widely-installed operating system in personal computers. It was essentially the same operating system that (Bill Gates's) young company developed for IBM as Personal Computer - Disk Operating System in 1981. Most users of either DOS system simply referred to their system as Disk Operating System. Like PC-DOS, MS-DOS was (and still is) a non-graphical line-oriented commanddriven operating system, with a relatively simple interface but not overly "friendly" user interface. Its prompt to enter a command looks like this: C:\> MS-DOS does not care about anything called an icon, wallpaper or screen saver. Rather than being considered as a Graphical User Interface (GUI) MS-DOS is what is known as a command-line interface. You type commands on what is called the command line. MS-DOS is a single-user, single-tasking computer operating system. In spite of its very small size and relative simplicity, it is one of the most successful operating systems that has been developed to date. In DOS, a file name consists of eight character followed by a 3 character file extension. The size of a file is restricted to a 4 byte file descriptor, which limits a file s maximum size to approximately 4 billion characters. The first release of DOS could not read or write to disk drives so users could only read and write to a floppy disc. DOS was not a state of the art operating system, even for its time. Its success can be attributed only to its relative cost to other operating systems at the time it was released. However, DOS was and still is a widely-used operating system. Understanding how it came to be and how it works can lead to greater insight into the current state of computing. 2
2.Field of Application Control & Systems Engineering Department - booting system for storage media. - File management - For single user systems only - Network client (NetBEUI, IPX/SPX, TCP/IP) - batch processing 3.Structure information - 16-bit operating system, (formerly 8-bit) - Single tasking - command interpreter for internal and external commands - external driver software imbedding for periphery devices possible 4.System environment - minimum: 512 Kbytes RAM, 5 Mbyte hard disk storage (depends on version for full installation) - FAT file system. - executable with every x86 compatible CPU - low RAM and fixed storage disk needs 5.The Command Prompt The command prompt - this is where you will see any output produced. This screen, among being called a command prompt, is often referred to as simply a DOS prompt, command line or a MS-DOS prompt. All versions of Microsoft Windows have had an MS-DOS like commandline interface (CLI). How to get to a MS-DOS prompt / Windows command line Windows NT, 2000, XP, Vista, and 7 users 1. Click Start. 2. Click Run. 3. Type cmd and press enter. 3
Otherwise, if you are using an older version of Windows, type command into the Run box and click "OK". You could also type command.exe After you click "OK", an MS-DOS command prompt window will appear. Depending upon which version of Windows you are using, the MS-DOS command window will look similar to this image: 4
The standard window displays white text on a black background. This color combination may make text difficult to read. To make the window display black text on a white background, type the command: color f0 (that's the letter f followed by the digit zero 0). To go back to the standard of white text on a black background, type: color This is called the command prompt or DOS prompt. The flashing underscore next to the command prompt is called the cursor. The cursor shows where the command you type will appear. 6.MS-DOS Commands 1- Viewing the Contents of a Directory (dir) To view the contents of a directory Type the following at the command prompt: C:\> dir A list similar to the following appears: 5
2-Make Directory (md) Allows you to create your own directories in MS-DOS. C:\>md test The above example creates the "test" directory in the directory you are currently in. md c:\test Create the "test" directory in the c:\ directory. 3- Change Directory (cd) The cd command is an internal command used to switch directories in MS-DOS cd\ Goes to the highest level, the root of the drive. cd.. Goes back one directory cd Typing cd alone will print the working directory. 6
4- Remove Directory ( rd) Removes empty directories in MS-DOS. To delete directories with files or directories within them the user must use the deltree command. 5- IP Configuration ( ipconfig ) Useful for troubleshooting your internet connection. Displays the current IP address of your computer and the DNS server address. If you call your ISP (Internet Service Provider) for reporting a bad internet connection, he will probably ask you to run ipconfig. To get your computers local network IP address, subnet mask, and default gateway typing ipconfig alone will display this information as shown below. Keep in mind this is only your local network information. 6- File Attributes (attrib) attrib allows a user to change the properties of a specified file. Using attrib, the user has the capability of changing the file to have any of the below attributes. attrib +r attrib +h attrib -h 7- edit Add the read-only attribute to a file so it cannot be modified until the read only attribute is taken off. Add the hidden attribute to the file causing it to be not be seen by the average user. This command will do the opposite of the above command. Instead of hiding the file it will unhide the file if hidden. Edit allows a user to view, create, and/or modify their computer files Edit is only able to open a file with a maximum of 65,280 lines. If you are running a MS-DOS version 4.x or lower or you are unable to find edit on your hard disk drive. 7
8- type Allows the user to see the contents of a file TYPE [drive:][path]filename 9- copy Allows the user to copy one or more files to an alternate location. copy *.* a: Copy all files in the current directory to the floppy disk drive. copy myfile1.txt+myfile2.txt 10- cls Copy the contents in myfile2.txt and combines it with the contents in myfile1.txt. Cls is a command that allows a user to clear the complete contents of the screen and leave only a prompt. 11- date The date command can be used to look at the current date of the computer as well as change the date to an alternate date. Date Display the current date and prompt for a new one. If no date is entered, the current date will be kept. 12- Rename Used to rename files and directories from the original name to a new name. RENAME [drive:][path][directoryname1 filename1] [directoryname2 filename2] REN [drive:][path][directoryname1 filename1] [directoryname2 filename2] Note that you cannot specify a new drive or path for your destination. 8
12- Delete (Del) Del is a command used to delete files from the computer. del test.tmp = Deletes the test.tmp in the directory that you currently are in, if the file exists. del c:\windows\test.tmp = Delete the c:\windows\test.tmp in the windows directory if it exists. del c:\windows\temp\*.* = (* is for wild character(s)) *.* indicates that you would like to delete all files in the c:\windows\temp directory. del c:\windows\temp\?est.tmp = (? is a single wild character for one letter) This command would delete any file ending with est.tmp such as pest.tmp or zest.tmp... 13- Format Format is used to erase all of the information off of a computer diskette or fixed drive. When using the format command, remember all information on the drive you wish to format will be completely erased. format a: Would erase all the contents off a disk. Commonly used on a diskette that has not been formatted or on a diskette you wish to erase. format a: /q Quickly erases all the contents of a floppy diskette. Commonly used to quickly erase all information on the diskette. format c: This would erase all the contents of your C: hard disk drive. In other words, unless you wish to erase all your computer's information, this command should not be done unless you're planning to start over. 9
10