In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "what are the basic commands of DOS". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
DOS basic command
Cd changes the current directory sys to make DOS system disk
Copy copy files del delete files
Deltree delete directory tree dir column file name
Diskcopy disk edit text editing
Format format disk md to create a subdirectory
Mem check memory status type displays file contents
Rd delete directory ren change file name
Remember how much ah, forget to go to class to have a look, the following four orders are new, give the command format, you have a try, the important thing to learn computer is to explore.
Cls screen cleaning
[applicable] the screen is too messy, or there is garbled code on the screen, clear the display on the screen without affecting any information inside the computer
[usage] enter cls
Move move files, change directory name
[where applicable] move files to another directory
[usage] move [file name] [directory] move files to a new directory
Move [directory name] [directory name] change the directory name
[example] c:\ > move c:\ autoexec.bat c:\ old??
Move the autoexec.bat file to the old directory
C:\ > move c:\ config.sys c:\ old??
Move the config.sys file to the old directory
More split-screen display
[applicable] when a lot of output can not be displayed on one screen, it is very useful for almost all commands, especially for commands such as type. When using more, the disk cannot be write-protected and is not suitable for the optical drive.
[usage] type [File name] | more displays the contents of the file on a split screen
More
< [文件名] 分屏显示文件内容 [例 子] C:\>Type msdos.w40 | more
Xcopy copies directories and files
[applicable] is useful when copying with subdirectories, much faster than the COPY command when copying a large number of files
[usage] xcopy [file name] [directory] copies the specified file to the specified directory
Xcopy [source directory] [destination directory] refer the source directory and subdirectories to the destination directory
Xcopy *. * [directory] / s copies files and non-empty subdirectories to the specified directory
Other commonly used parameters are: v check after copy, which will affect the speed
E is similar to s, but is copied even if the subdirectory is empty.
Help help
[applicable] use when you want to know exactly how to use the DOS command
[usage] help provides all DOS command help
The help [DOS command] provides help with commands
If you only remember a command in general, you can type the help command directly at the prompt, and the following screen will appear:
Attrib sets file properties
[applicable] when you want to do special treatment to the document
[usage] attrib displays the properties of all files
Attrib + r or-r [File name] sets whether the file property is read-only
Attrib + h or-h [File name] sets whether the file attribute is implied.
Attrib + s or-s [file name] sets whether the file attribute is a system file.
Attrib + an or-a [file name] sets whether the file attribute is an archive file.
Attrib / s sets file properties, including files in subdirectories
[example] C:\ TEST > attrib + r wina20.386
C:\ > attrib + h *. * / slots? Imply all files
Date display and modification date
[applicable] want to know or modify the time and date
[usage] date displays and changes the current date
C:\ > date 09-20-1996? Change the date to September 20, 1996
C:\ > date??
Current date is Tue 08-20-1996
Enter new date (mm-dd-yy): 09-20-1996
Modify the current date in the order of month-day-year directly press enter to ignore the modified date
Lable sets the volume label
[applicable] to mark the disk
[usage] label displays disk volume label
Label [disk letter] [volume label name] sets the volume label of the specified disk
[example] C:\ > label??
Volume in drive C is WANG
Volume Serial Number is 2116-1DD0
Volume label (11 characters,Enter for none)?
You can enter the volume label and enter directly after entering the car.
Delete current volume label (Y big N)?
Press y to delete the old volume label and n to do not change
Defrag disk defragmentation
[applicable] the disk is read and written a lot, or the disk has been used for a long time, so you may need to use this command to clean up the disk. Disk fragmentation does not mean that the disk is broken, but because the use of the disk will be very incoherent after many copies and deletions of files, resulting in slower speed.
[usage] 1.C:\ > defrag??
two。 Select the disk to be sorted
3. The computer analyzes the condition of the disk and then tells us how many disks need to be sorted out. Press the ESC key
4. Select Optimization Method (disk optimization method), select optimize all or optimize files only
5. Select Begin Optimization to start finishing
6. When you are finished, press enter
7. Press Esc to exit.
Doskey calls and builds DOS macro commands
[applicable] it is very useful when you often need to enter duplicate commands
Doskey
The doskey will be stored in memory and a buffer will be opened. All commands entered later will be saved in the buffer and can be called at any time.
Doskey [macro command name] = [command name]
Define the macro command as a command, and later enter the macro command, and the computer will execute the corresponding command.
Doskey / reinstall reinstall doskey
Doskey / bufsize= sets the size of the buffer
Doskey / macros displays all doskey macros
Doskey / history displays all commands in memory
Doskey / insert | overstrike sets whether newly typed characters overwrite old characters
[example] C:\ > DOSKEY??
C:\ > dir
C:\ > copy C:\ temp\ *. * a:
C:\ > del c:\ temp\ *.
C:\ > copy b:\ *. * c:\ temp
The above four commands have been saved, and you can choose to use or modify them with the top and bottom of the cursor control key, or you can use the F7 key to list all the saved commands
C:\ > doskey di=dir/w/p?? Define di as a macro command, which means to execute dir/w/p
Fdisk hard disk partition
[suggestion] only when the hard disk is infected by a very serious virus, or when a new hard disk needs to be partitioned, it is best to ask someone who knows how to do it. Hard drives need to go through three steps of low-level formatting, partitioning and formatting before they can be used, and the hard drives in the finished computer have already been processed.
[usage] enter fdisk and press enter to enter the prompt interface
Emm386 extended memory Management
[suggestion] this command is complicated and will be described in detail in the system configuration in Chapter 5.
Lh/loadhigh loads programs into high-end memory
[applicable] this command is generally used in autoexec.bat and is useful when some software requires a large amount of basic memory
Lh [program]
When using this command to load a program into high-end memory, the following two statements are required in the config.sys file. Device=emm386.exe dos=umb
Lh [Program] / l: the area code loads the program into the specified umb area
Lh / s is usually dedicated to memmaker.
C:\ MOUSE\ > lh mouse?? loads the mouse driver into high-end memory
Memmaker memory optimization management
[applicable situation] this command is seldom used now. When DOS was popular, you could play games without it. It can free up a lot of basic memory for games, and you only need to install it once.
[usage] 1.C:\ > memmaker??
two。 Enter to continue, F3 exit
3. Select manual installation and automatic installation, directly enter to indicate automatic installation (enter please)
4. Choose whether there is a program that needs to expand memory, you can choose the space bar, Yes says it is needed, No does not need it, just press enter.
5. The program automatically detects whether WINDOWS is installed in the hard disk.
6. If there is a floppy disk in the floppy drive, you should remove it, then press the enter key, and the computer will restart twice, do not interrupt, just press the enter key.
(in fact, it's very simple, just press enter all the time, hehe)
Msd system detection
[applicable] used to check system information
[usage] 1. C:\ > after entering msd, you can see the following picture, with a note next to each option indicating the function of the button.
?? 2. Selecting the items to be queried, such as the first Computer, will pop up a dialog box showing some basic information about the computer. You can try other options and see what they can do.
3. After pressing Alt+F to activate the drop-down menu, select the "Exit" item to exit.
Undelete restores deleted files
[applicable] it can be used when you accidentally delete the wrong file.
When DOS deletes a file, it just removes the file from the allocation table, deletes the first letter of the file name in the disk storage area, and the file content is not immediately deleted from the disk, so it can be restored.
[usage] undelete restores deleted files
Undelete / all recovers files and no longer asks if you want to restore.
First in the order of "#% &-0123456789abcdefghijklmnopqrstuvwxyz"
Letters to restore files
Undelete / list column recoverable filename
Undelete / s can host undelete in memory, but few people use it this way.
Prompt Settings prompt
When you are tired of the c:\ > prompt or you want to make your prompt different, you can try the very interesting DOS command that displays the time and date at any time.
[usage] prompt $pyogg uses the current directory name and > number as the prompt, which is the most commonly used prompt
Prompt $t for time prompt $d for date
Prompt $$means $prompt $Q means =
Prompt $v for the current version prompt $l for prompt wang$g?? Use wang > as a prompt
WANG > prompt $time, date, and > sign as the prompt
0:01:07.77Thu 08-29-1996 > prompt $pendant?
C:\ DOS >
Restore restores backed up files
[suggestion] if you have previously backed up files with backup, you can use it to recover files when the original file is corrupted.
Restore the files on the disk backed up with the backup command to another disk, where there should be two files, backup.00X and control.00X.
[usage] restore [backup drive letter] [destination drive letter]
Restore the backup files on the backup disk to the specified disk
Restore / s restores backup files, including subdirectories, to the specified disk
Restore / p lets the user decide whether to restore the file or not
Restore / b: date files prior to the recovery date
Restore / a: files after the date of recovery
Restore / l: files before time recovery time
Restore / e: files after time recovery time
Restore / m restores only files that have been modified since the last backup
Restore / n restores only the deleted files since the last backup
Restore / d displays only the file names to be restored
[example] C:\ DOS > restore a: CRAV?
Insert backup diskette 01 in drive A:
Press any key to continue. . .
Put the first backup disk in drive A, press any key, and after restoring the first disk, put the other disk in order.
When you cannot recover the file correctly with the above command, use:
C:\ DOS > restore a: C:\ / slots?
Time display and modification time
[applicable] is used to display and modify time, and its usage is the same as date
[example] C:\\ DOS > time??
Current time is 12:15:26.04a
Enter new time: 11:20:20.00p
On time: enter the time in sequence, and then press the ENTER key directly in the afternoon to ignore the modification time.
Set sets environment variables
[applicable] when setting up sound cards and paths, etc.
[usage] set [environment variable] = [string]
This command is often used in autoexec.bat
C:\ > set blaster=a220 i5 D1 sets the parameters of the sound card
C:\ > set path=c:\ dos path c:\ dos has the same meaning
Smartdrv setup disk Accelerator
[suggestion] it can improve the access speed of the hard disk, it is best to load it in the autoexec.bat file.
Smartdrv / x
Executing and residing memory, opening up disk acceleration caches, and shielding all drive caches are the more common methods (this command is generally enough)
Smartdrv / c writes all the information in the cache to the hard disk
Smartdrv / e: digitally sets the amount of information to be moved at a time
Smartdrv / b: digits set the buffer size to be read in advance
Append sets the path to the non-executable file
[applicable] when you can't find your input in multiple directories, you can try this command, which is similar to path.
[usage] append [path]
[example] C:\ > append c:\ test??
Set the path to find non-executable files to c:\\ test. If there is a file 1.txt in this directory, you can automatically find the c:\\ test directory when the other directory call 1.txt cannot find it.
D:\ UCDOS > edit 1.txt can find the C:\ test\ 1.txt file
Debug program debugging command
[suggestion] if you have learned assembly language, you should be able to use debug. If you haven't, you'd better not use it.
[usage] debug [file name]
Diskcomp comparison disk
[applicable] compare whether the two disks are the same. I didn't expect when they will be used. When comparing the two disks copied with diskcopy, why not use the diskcopy/v check?
[usage] diskcomp [disk letter 1] [disk letter 2] compare disk 1 and disk 2
Diskcomp / 1 compares only the first side of the disk
Diskcomp / 8 compares only the first 8 sectors without tracks
C:\ > diskcomp a: a:
Compare two disks in the same floppy drive
Insert FIRST diskette in drive A:
Put it on the first disk
Press any key to continue. . .
Comparing 80 tracks 18 sectors per track, 2 side (s)
Insert SECOND diskette in drive A:
Put in the second disk.
Press any key to continue. . . Compare OK
No difference was found in the comparison.
Compare another diskette (Y _ map N)? n
Whether to compare other disks, select y to continue the comparison, select n to stop
Expand decompression tool
[applicable] there are many compressed files with the suffix ending with "_" in the original installation disk of Microsoft software, which can be used to extract and relieve you of the trouble caused by the loss of a few files.
[usage] expand [source document name] [destination file]
[example] C:\ > expand abank v.coc:\ dos\ vsafe.com
? Vsafe.co_ is a vsafe.com file
Microsoft (R) File Expansion Utility Version 2.10 Copyright (C) Microsoft Corp 1990-1993. All rights reserved.
Expanding a dos vault. Co _ to c:\ dos\ vsafe.com. A:vsafe.co_:33046 bytes expanded to 62576 bytes, 89% increase.
C:\ DOS >
Fasthelp quickly displays help information
[suggestion] you can look at all the commands. For a single command, you might as well add / after the command name. Convenient parameters
[usage] fasthelp lists the use of all DOS commands
Fasthelp [command name] shows the use of the command, which is equivalent to [command name] /?
Fc file comparison
[suggestion] maybe most people will never use it.
[usage] fc [file name 1] [file name 2] compare the different parameters of the two files: a c l Lbn n t w nnnn
[example] C:\ TEST > fc a.bat b.battered?
Comparing files A.BAT and B.BAT
* A.BAT
Choice / c:dme defrag,mem,end
If errorlevel 3 goto defrag
If errorlevel 2 goto mem
If errotlevel 1 goto end
* B.BAT choice / c:dme defrag,mem,end
* C:\ TEST >
Interlnk starts the simple network client
[applicable] if there are two computers that can be connected to intersvr to form a simple network, this is a very useful command, but it is not often used
[usage] DOS adds the function of supporting network
It can connect two computers through parallel or serial port lines to form a simple network to use interlnk must add a sentence to config.sys:
Device=c:\ dos\ interlnk
Both ends of the parallel line should be a 25-pin male joint, and the connection between the needles is as shown below: corresponding
P2----p15
P3----p13
P4----p12
P5----p10 male connector finger joint is with needle
P6----p11 female joint means that the joint is perforated
P15---p2
P13---p3
P12---p4
P10---p5
P11---p6
P25---p25 ground wire
[example] C:\ DOS\ > interlnk Port-LPT1
This Computer Other Computer
(Client) (Server)
--
E: equals A:
F: equals C:
In the client, disk E is the A disk of the server, and disk F is the C disk of the server.
Intersvr starts the simple network server
[applicable] with it, the computer becomes a server (only with the simple network provided by DOS)
[usage] intersvr starts the server
Intersvr / lpt:1 starts the service machine and uses lpt1 port as the data transmission port
Intersvr / com:1 starts the service machine and uses com1 port as the data transmission port
Parameters also include x baud: b v rcopy (see interlnk)
[example] C:\ DOS > intersvr??
Qbasic launches Basic integrated environment
[suggestion] maybe most people will never use it.
[usage] if you know the qbasic language, you can use it to write your own program. Edit.com must have it to be available.
Qbasic startup basic language environment
Qbasic/editor edits the language in full screen mode
Parameters also include: b g h mbf nohi run
[example] C:\ DOS > qbasic??
Setver setting version
[applicable] you can use it to deceive the computer when you want to use other versions of the dos command. In higher versions of DOS, when some older versions of programs require DOS3.3, you can use setver to set
[usage] generally add device=setver.exe to config.sys when in use
Setver displays the version of the file
Setver [File name] n.nn sets the version number of the specified file
[example] C:\ DOS > setver??
KERNEL.EXE 5.00
DOSOAD.SYS 5.00
EDLIN.EXE 5.00
BACKUP.EXE 5.00
ASSIGN.COM 5.00
EXE2BIN.EXE 5.00
JOIN.EXE 5.00
RECOVER.EXE 5.00
WINWORD.EXE 4.10
C:\ >
If the program AAA.exe must be executed under MS-DOS3.3, type
C:\ DOS > setver aaa.exe 3.30?
If net5.exe is only executed under MS-DOS5.0, it can also be run under Ms-DOS6.22 after adding device=setver.exe to config.sys.
Share file sharing
[suggestion] use it only if the software declares that it must be run
[usage] you can add install=share.exe to config.sys or run the parameter f l directly.
Subst path replacement
[suggestion] A very interesting command that may be useful if you often use CD-ROM software.
[usage] subst displays the current alternate path
Subst [drive letter] [path]
Replaces the drive letter with the specified path, which will be used as the drive
Subst / b release substitution
[example] C:\ DOS > subst a: C:\ temp?? Replace disk a with temp directory of disk c
C:\ > subst a: / d? What's wrong with you? Substitution
Tree displays the command tree structure
[where applicable] View all subdirectories
[usage] tree [drive letter] displays all subdirectory trees
Tree / f displays the file name as well as the directory
Tree / a displays the directory tree with ASCII code
[example] C:\ WINDOWS > tree / asides?
Unformat restores a disk that has been formatted
[suggestion] have you formatted the floppy disk with important information? Use unformat quickly. What? If you use format / u, you're dead.
[usage] unformat [drive letter] restore the specified formatted disk
Unformat / l displays the file name found by unformat
[example] C:\ WINDOWS > unformat av?
Vsafe virus protection program
[suggestion] loading it into memory can detect many kinds of viruses at any time, which is more useful.
[usage] vsafe loads vsafe in memory
Vsafe / u removes vsafe from memory
Vsafe/ne loads vsafe into expanded memory
Vsafe/nx loads vsafe into extended memory
Parameters also include Ax Cx n d
[example] C:\ > vsafe
Ver displays DOS version
[example] C:\ > ver
?? MS-DOS Version 6.22
C:\ >
Vol displays the specified disk volume label
[example] C:\ > vol??
Volume in drive C is Wang
Volume Serial Number is 2116-1DD0
C:\ >
Ctty change control equipment
[suggestion] input and output devices used to change control. You can try this command, but I'm afraid it won't work. It's one of the most useless commands in DOS.
[usage] ctty [device name] Settings console
[example] C:\ > ctty aux?? sets aux as the input / output device.
Is it dazzling to introduce so many commands? The key to learning DOS is to practice all kinds of commands, but I have to remind you that some commands should be careful, or it will be too late to repent.
Del *. * Delete all files in the current directory
[suggestion] using del *. * in the root directory of disk C will make the computer unable to find the mouse, optical drive, windows, or even boot. In fact, using this command in any directory requires careful consideration.
Deltree *. * Delete all directories and files under the current directory
[suggestion] to use this command in the root directory of disk C, you must make sure that you are clear-headed and that it is necessary, but we do not think this command should be used in this way under any circumstances. Using deltree *. * in any directory will produce the same or worse results as del. *. Be careful! Be careful!
Format CMU format C disk
[suggestion] unless your hard drive is deeply infected by a virus, or a real computer expert tells you to do so, don't format disk C, it will make you lose all information and it will take a few hours to reinstall all the software.
Fdisk hard disk partition
[suggestion] when partitioning a hard drive, be sure to ask someone who has used this command to help you use it, otherwise you will lose all information and even the hard drive will not work.
Recover overlay disk
[suggestion] there will be no more this command after DOS 6. If you are using an old version of DOS, you are advised not to use it at any time. It will do nothing but destroy all the information on your hard drive.
This is the end of the content of "what are the basic commands of DOS". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.