DOS is actually short for DiskOperationSystem. As the name suggests, it is an operating system based on disk management. The biggest difference with the operating system we use now is that it is in the form of a command line, relying on the input of commands to carry out human-computer dialogue, and through the form of commands to the computer to pass instructions to the computer to realize the operation of the computer. So the operation is also very simple, just type in the command, and then enter, the system will execute the command.
In essence, including the series of versions of windows95 and win9x, these seemingly fully graphical operating systems are also built entirely on top of dos. It's just wearing a suit.
On the other hand, we can find dos in any of the series of versions of widows. In Win9x/Me, you can type "command" into the run program in the start menu to get to the command line interface. In Win2000/NT start menu in the run program type "cmd" command, you can enter the command line interface. And you can access the console with windows 2000 and xp by using the startup CD-ROM. The console is also in command line form, and the system maintenance commands in it are to a large extent the same as DOS commands, so if you know how to use DOS, you will basically be able to use the console. In many cases, problems that cannot be properly solved using the graphical interface can be solved through the command line.
One thing to emphasize is that command line programs are divided into internal commands, which are loaded into memory with command.com, and external commands, which are separate executables, one by one.
The internal commands are concentrated in the command.com file in the root directory, which is read into memory every time the computer starts up, which means that the internal commands reside in memory while the computer is running, and cannot be seen with the dir command.
External commands are stored on disk as individual files with com and exe extensions, which are not resident in memory, but are only called into memory when the computer needs them.
Second, learn about some of the norms of DOS documentation.
In DOS, this format is generally used to illustrate DOS commands: "dir [C:][path][filename][.ext][/o][/s][/p][/w][/a]"
Where " dir" is a DOS command, and everything after it is the command's arguments. In DOS, you can use the command +/? to get an explanation of the command's parameters and related functions. When you encounter unfamiliar DOS commands in the future, you can use this method to learn the parameters of the command and learn to use them.
C:
This part is the drive letter, or d: in the case of the D drive, and so on. In many operating systems, there is no such thing as a "disk".
Path
This is the path, or if there is no path, the current directory on the current disk.
Filename
Filename, in this case, means the main name of the file. Certain programs tend to handle files with certain extensions, so many times it is not necessary to enter the extension.
.ext
Extension, the extension of the file relative to the main name above. It is generally used to describe the format of the file.
Filespec
File identifier
[ ]
Square brackets, which indicate that an item is optional, and that the user can leave it out as needed
{ }
Curly brackets, which indicate that an item is mandatory
|
Vertical lines, which indicate that one of the two sides can be either one or the other. content can be one or the other
...
Indicates that the item can be repeated.
In this section, we mainly want to tell you about common DOS commands.
Total DOS commands **** about a hundred (including text editing, virus checking, configuration files, batch processing, etc.) One by one, it seems not very realistic to introduce, commonly used is one of the few one or two dozen, we will introduce the one or two dozen commonly used DOS commands.
One of the directory commands:
1. DIR
DIR is an acronym for directory (directory), which is mainly used to display files and subdirectories in a directory.
[Function] Displays information about files and subdirectories in a specified disk and directory, including the volume label of the disk where the files and subdirectories are located, the names of the files and subdirectories, the size of each file, the date and time when the files and directories were created, as well as the number of subdirectories of the files, the total number of bytes they occupy, and the total remaining space on the disk.
[Format] dir [C:][path][filename][.ext][/o][/s][/p][/w][/a]
[Explanation] dir is the most commonly used of the DOS commands. A slash indicates that what follows is an argument.
Parameter Meaning
/p When displaying a screen full of information, pause the display and press any key to display the next screen
/w Display only filename directory names, five filenames per line.
/s Displays all directory files in a directory and subdirectories. If it is DIR [filename] /s The effect is to search for files that match the criteria in the current section and in each of the subordinate subsections.
[Example] To display files in the C:\mybook\ directory: DIR c:\mybook\*. *
2. md
md stands for make directory
[Function] Creates a subdirectory
[Format] md [C:]path
[Example] Use md to create a directory called mage md c:\mage
3. cd
cd is an abbreviation for change directory
[Function] Change or display the current directory
[Format] cd [C:][path]
[Explanation] Paths can be used as both absolute and relative paths. If there is only cd without arguments, only the current path is displayed. Note: There must be two "special directories" in the subdirectory, "." "..." in the subdirectory, where one dot indicates the current directory and two dots indicate the previous directory. From a simple and practical point of view, all we need to do is to learn to enter a directory level by level (cd a directory name on the next level), and exit a directory level by level (cd...). This will solve all the problems. Of course, you can also use absolute paths.
[Example] cd to the mage directory you just created cd c:\mage
4. rd
remove directory--remove directory
[Function] Remove empty subdirectory
[Format] rd [d:]path
[Description] rd is the command that removes empty subdirectories. command to delete empty subdirectories. Note two things: first, you cannot delete a non-empty directory; second, you cannot delete the current directory.
[Example] Use rd to delete the directory mage.
Second, file operation commands:
5. copy means copy in English
[Function] Copy a file or a group of files to a specified disk or directory
[Format] copy [C:][path][filename.ext] [C:][path]filename.ext
[Description] The basic usage of the copy file command is: "copy Source filename destination filename". If you write only the target path but not the target filename, it means copying with the same name; otherwise, it is called copying with a new name. Note: the name of the copy generally do not change the file extension.
[Example] To copy all the files in the C:\mage directory to a floppy disk, you can type the following command, please note that the current disk is different from the current path:
C:\>copy c:\mage\*. * a:
If there is already a file with the same name on the target disk, the following prompt will appear, "Overwrite xxxx(Yes/No/All)" At this point, the answer to Y is to overwrite the current file, N is to keep it, and A is to overwrite all the files after that without asking any more questions.
6. del
del is an abbreviation for delete
[Function] To delete a file or a group of files from a specified disk or directory
[Format] del [C:][path]filename.ext
[Explanation] This command should be used carefully. Once deleted, it will not be easy to recover. Wildcards can also be used to delete a class of files. When utilizing *. *, for security purposes will give a warning to determine the party to carry out the deletion work. Deletion process, such as no information prompts, that has been correctly deleted.
Note that this command can not delete the file with read-only, implicit, system attributes; if the specified file does not exist, then the "File not found" prompt; DOS on the mistakenly deleted files can be recovered with the UNDELETE external command; it can only delete the file, can not delete the directory.
7. ren
ren is the short form of rename
[Function] Change the name of a file or a group of files on a specified disk or directory
[Format] ren [C:][path]filename1[.ext] filename2[.ext]
[Format] ren [C:][path]filename2[.ext]
[Format] ren [C:][path]file1[.ext] file2[.ext]
[Description] The rename operation is limited to the name of a particular file or group of files, it does not change the directory where the files are located. If wildcards are used, the rename is performed on a group of files.
8. type
[Function] Command to display the contents of a text file on the screen
[Format] type [C:][path]filename.ext
[Explanation] The type command is used to display the contents of a text file on the screen in a quick and easy way. a file with the extension TXT is a text file. If you use this command to display the extension EXE or COM and other files, the output is often a number of messy symbols and accompanied by irregular ringing, and sometimes even crash. If you can't finish the display on one screen, you can use |more at the end of the command.
Three disk operation commands
9. format
[Function] Disk format
[Format] [C:][path]format drive:[/S]
[Explanation] Disks can be used to store the files under various operating systems, and the output can be used to store the files under various operating systems, such as EXE or COM. disks can be used to store files under various operating systems. The format of disks for different operating systems is generally different and is not universal. the format command is used to make a new disk recognizable to the DOS operating system, i.e., to store DOS files.
The process of formatting a disk with this command is actually a process of planning the disk with the information storage format specified by DOS. When formatting a disk, it clears all data already on the disk, writes a boot record on the disk, divides up the file allocation table and the root directory, and at the same time, it identifies all bad sectors on the disk and marks them as unusable. The only command parameter we have listed here is /S. When this parameter is used, the disk is formatted and loaded with operating system files to make it a boot disk. This is equivalent to format and then the next command: SYS.
10. discopy
diskcopy
Diskcopy, which translates to disk copy
[Function] To make a duplicate of a disk with exactly the same contents as the original disk.
[Format] diskcopy Source drive name Destination drive name
[Description] The feature of diskcopy is that it is an exact copy of a disk from track to track. Its main use is for backups. For example, when we first bought our computer, it will come with some device driver disks, these drivers may be used in the future, in order to prevent damage to these disks, they must be backed up a set, this time, the use of diskcopy command is faster and more convenient.
11. deltree
[Function] Deletes a directory tree
[Format] [C:][path]DELTREE [C1:][path1] [[C2:][path2] [...]]
[Description] This command wipes out the entire specified directory tree. regardless of whether it is read-only, hidden or not. It should be used with extreme caution. It is a dangerous command.
12. chkdsk
chkdsk stands for check disk.
[Function] Used to check the usage of your disk.
[Format] chkdsk disk name
[Description] For example, to check the usage of disk A, enter chkdsk A: , to check the usage of disk c, enter chkdsk C: , and if you enter chkdsk directly, you will check the current disk usage
13. sys
[Function] Passes the system file commands. Transmits the two implicit DOS system IO.SYS and MSDOS.SYS to a specific location on the target disk, and copies the COMMAND.COM file over. When this is done, the target disk becomes the DOS boot disk.
[Format] [C:][path]SYS [C1:][path] d2:
[Explanation] Since these files need to be copied to a specific location, the copying accomplished with the COPY command may not be able to boot the machine. With the SYS command, DOS can move files that already occupy a specific location on the target disk and copy system files to the corresponding location. The parameter C1:path is used to specify the directory where the system files are located. If not specified, the default is the current directory of the current disk. So this command is usually done in the root directory of the source disk.
Originally, DOS should be finished after talking about commands, but considering that nowadays most of the friends who surf the Internet have not touched DOS from the foundation, and rarely have the opportunity to touch DOS in the actual application environment, so I would like to talk about the loading of the system devices and the system environment settings under DOS, so that we can really use DOS.
First of all, I'd like to say that SYS file is a professional system startup configuration file, which is mainly used to load the memory management program, set the expansion memory and extended memory, load the relevant hardware drivers, set the relevant environment variables, etc., to create the necessary conditions for the normal use of the user's computer, so that the user can use the system environment to create the necessary conditions for the user's computer. The normal use of the user's computer to create the necessary user environment (in the DOS era, proficient Config.SYS file is often a sign of "expert"). (In Windows 95/98, the system already comes with memory management, environment variables, and other settings, the role of the Config.sys file has been far less important, and it is still "in service" mainly to maintain compatibility with older DOS applications. Configuration items often used in config.sys are as follows:
1, FILES = number
The number of files that can be opened at the same time, you can choose from 20 to 50, you need to pay attention to the value of the FILES is set to too large will take up too much of the base memory. The system default is FILES=8.
2. BUFFERS=number
Indicates the number of disk buffers to be set, which is usually around 20-30. the default value is usually 15. The default value is usually 15. A disk buffer is a memory area used to store data read from disk or to store data written to disk.
3. DEVICE and DEVICEHIGH
Used to load some memory-resident programs for managing devices. For example, memory management programs and optical drive drivers. For example:
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE RAM
DEVICEHIGH=C:\CDROM\CDROM.SYS
DEVICEHIGH is different from DEVICE in the following ways. The former loads the program into high end memory.
4. HIMEM.SYS and EMM386.EXE
DOS can only use 640KB of memory directly, i.e., the base memory, and must rely on other memory management programs to use more memory, and these two commands are the most commonly used memory management programs.
The memory between 640KB and 1MB is known as high-end memory, and is reserved for use by the system. memory above 1MB becomes extended memory, and HIMEM.SYS is responsible for managing extended memory.
EMM386.EXE is responsible for managing the high end memory and emulating the expanded memory in the extended memory for use by certain software.
So in order to use more memory, the configuration file should have the following directives.
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE RAM
It is important to note that EMM386.EXE must require that HIMEM.SYS be installed first, and therefore it is important to make sure that the configuration commands to install HIMEM.SYS are installed before EMM386.EXE before.
5. DOS = HIGH, UMB
Generally, the CONFIG.SYS file is required to include this command, which will move DOS system files into high end memory, freeing up more base memory for other software. Note that if EMM386.EXE, UMB, is not installed, then this command will be invalid.
The following is the content of a typical CONFIG.SYS file:
DEVICE=C:\DOS\HIMEM.SYS (Load himem, the Extended Memory Manager)
DEVICE=C:\DOS\EMM386.EXE NOEMS (High-end Memory Merge into Extended Memory utility)
BUFFERS=15,0 (number of buffers)
FILES=50 (number of files open at once)
DOS=UMB (where the system puts DOS itself)
LASTDRIVE=Z (what is the maximum size of the drive disk drive that can be used)
DOS=HIGH
DEVICEHIGH=C:\DOS\ATAPI_CD.SYS /D:MSCD000 /I:0 (Load the optical drive driver.)
STACKS=9,256
Additionally, a menu-based multi-task selection configuration can be configured in CONFIG for different tasks, such as playing games, setting up virtual disks, etc., but these applications are not commonly used at this point in time, so I won't go into them here.
With config.sys, most of the environment can be set up, but there are still times when autoexec.bat is needed to collaborate on loading system devices, such as the CD-ROM drive. In addition, there are devices that are written to be driven directly using commands, so it is best to execute them in autoexec.bat to drive them directly, such as a mouse.
The following is a typical autoexec.bat:
About AUTOEXEC.BAT
The computer will automatically look for the AUTOEXEC.BAT batch file every time it starts up, so that it can execute some of the commands that need to be executed every time you boot up the computer, such as setting up a path to the PATH, and loading the mouse driver MOUSE, SMARTDRV for disk acceleration, etc.
A typical AUTOEXEC.BAT file is given below:
@ECHO OFF 'Do not show command line
'Set directory prompt before prompt
PROMPT &P& G
PATH C:\DOS;C:\;C:\ WINDOWS; C:\DOS; C:\DOS;WINDOWS;WINDOWS; C:\WINDOWS; C:\DOS;WINDOWS; C:\WINDOWS WINDOWS; C:\TOOLS 'Set file lookup path
LH C:\MOUSE\MOUSE.COM
'Load mouse driver
LH C:\DOS\SMARTDRV.EXE
'Load Disk Acceleration Manager
LH C:\DOS\ MSCDEX /S /D MSCDEX /S /D:MSCD000/M:12 /V 'Load CD-ROM drive
'Set temporary directory
SET TEMP=C:\TEMP
If you need to boot a Chinese system, you can also add the boot command for the Chinese system, so that naturally it will be a Chinese dos after booting.
The config.sys and autoexec.bat files can be used to configure the DOS environment in most cases.
DOS Example Manual
/soft/SoftView/SoftView_19.html
DOS Getting Started Tutorial
/soft/SoftView/SoftView_26.html
See more. It will help you
I hope my answer is helpful