DOS common command

zhaozj2021-02-17  75

First, the format of the DIR command:

DIR [D:] [PATH] [Name] [[/ a] [: attrib]] [/ o: [sorted] [/ s] [/ b] [/ l] [/ c [h]

(1) DIR / A: Attrib Default contains all files (system files. Implied files)

Attrib [:] [h / -h] shows only an implied file or a non-hidden file.

[r / -r] only display read only file or non-reader file

[s / -s] only display system files or non-system files

[A / -A] Only display to archive or non-archive files

(2) / o [:] sorted: The default is completely in alphabetical order, and the subdirector is displayed before the file.

/ O [n / -n]: in alphabetical order or in the file name sequence / reverse display

[e / -e]: Press the extension name order / reverse display

[d / -d]: in time sequential / reverse display

[S / -S]: According to the size from large to small or / reverse

[g / -g]: Press the sub-directory before the file or file is first on the child directory

(3) / s parameter: list all the files in the current directory and its subdirectories

Column name: DIR / S / A / O: N C: /> PRN

Print all subdirectories and files on the C drive and print out according to subdirectory and file alphabetical order

(4) / b parameter: will only display file name and extension

(5) / L parameter: list all the files or subdirectories with lowercase letters

training:

DIR / A Current Directory All files (including implicit and system files)

DIR / AH column implies file (including subdirectory (implicit) DIR / A-H

DIR / AS column system file DIR / A-S

DIR / AD List Directory DIR / A-D

DIR / O in alphabetical order

DIR / B only shows file name and extension

Second, Attrib [ R | -R] [ A | -A] [ S | -S] [ H | -H] [D:] [Name] [/ s]

Default Attrib Name Displays (files) attributes

Attrib io.sys (or child catalog)

SHR C: / IO.SYS is specified as system (S) implied (H) read-only (r) file

You can also display file properties called SYS atTtrib * .sys.

Parameters [ r | -r] Set the file attribute or release the read-only properties

[ A | -A] Set the file attribute or release the archive attribute

[ H | -H] Set the file attribute setting or release implies attributes (especially the subdirectory also works)

/ s parameters work all the files in current and current subdirectory

Can look for files

example:

Attrib News86 column document properties

Attrib r report.txt is set to read-only attrib-s-h record.txt

Attrib a a: *. *

Attrib -a a: *. Bak

Xcopy A: B: / A Disguised all the flags on the A disk to the file to the file with the "archive" property

Xcopy A: B: / m Remove all files on the A disk to the B disk and remove the archive attribute

Third, CD introduction: CD ... Return to the secondary directory "." Represents the current directory "."

Cd ../ .. Return to the parent directory of the upper level (ancestate)

CD A: / change the current directory of the A disk to the root directory

CD A: / XX change the current directory of the A disk to the subdirectories XX

Cd ../98 first return to the parent directory, then enter the 98 subdirectory under the parent directory

CD .. Return to the Parent Republic

CD / 98 enters the 98 subdirectory under the root directory

Fourth, Copy [/ y] [/ - y] [/ v] [/ b]

Copy / Y does not add prompt, cover all files

/ -Y Tips, for all files (Yes or No)

/ v copy after verify

/ B Press binary to display

Copy W1.WPS CON / B can display the WPS file on the screen without having to enter the WPS status

Copy ../98 copy all the files under the 98 subdirectory under the parent to the current subdirectory

Copy ./97 When the file in the 97 subdirectory in the current directory is copied to the current directory

Copy. C: / copy all files in the current directory to the C-root directory

Means *. * File

Copy Nul A.ABC Clear a.abc file (file length is changed to 0)

Copy file name CON to add a text file (F6 store exits) to the text file or the content COPY CON file name (F6 store exits)

Copy Con PRN Detection Printer Switch

V. xcopy command

Xcopy [Source] [D: Date] [/ P] [/ s] [/ e] [/ v] [/ y]

Xcopy [D: Date] XCopy A: B: / / / D: 08/18/98 / S / V Copy 98.08.18

Xcopy [/ P] prompts to create a subdirectory

Xcopy [/ s] There is a copy of the sub-directory. Note: If this subdirectory does not exist on the target disk,

The end of the disc is not ended without "/", will be prompted:

Does Destination Specify A File Name or Directory Name on The Target

[f = file, d = DIRECTORY]?

Create a file on the target disk [Press] or create a subdirectory [Press D]? Select D to

Xcopy [/ v]

*: (1) XCOPY does not copy the system and implies file, first modify the property and copy

Xcopy [/ y] Is there a prompt when it is overwritten, / y does not prompt

If the target disk or sub-directory name is omitted, copy it to the current directory.

Sixth, del / p

Plus / P can be prompted before deleting

For example, Del is added, all files (implicit. System. Read-only files) will be completely removed.

Plus / P can be confirmed.

Seven, Undelete [Name] / au

No prompt to restore all the files that meet the conditions (can restore), and put the first letter into "#", if

Presented, add it in "#% & 0 1 2-9 a-Z".

Such as: undelete * .dbf / Au will extend the full recovery of "dbf", and start with "#", as a file

Name, / list only lists recoverable files without recovering

Undelete / Load puts Undelete into memory

/ unload unloads the memory of Undelete

/ s [Drive] Monitoring the specified drive

Undelete / SC

Will the undelete resident in memory, and create an implicit Sentry subdirectory to delete the file deleted by the C

Management undelete / DS recovery

The corresponding recovery command can completely restore the file name (very complete) with Undelete

Undelete *. *

DELTREE / Y [Drive: Path]

Deltree Deletes subdirectory and files, although some files are system files or implicit files

It can have wildcards, when there is wildcard, it will delete eligible files and subdirectories

Such as:? Undelete * .dbf / Au will extend the full recovery of "dbf", and start with "#" as a file

name.

/ List only lists recoverable files without recovering operations.

Undelete / LOAD puts Undelete into memory.

/ unload will remove the Undelete.

/ s [Drive] Monitoring the specified drive.

Undelete / SC will resident Undelete, and create an implicit Sentry subdirectory deleted

The file is managed. The corresponding recovery command can completely restore the file name (very perfect) with Undelete / DS.

The most commonly used Undelete *. *

Eight, deltree / y [drive: path]

Deltree Deletes subdirectory and files, although some files are system or implicit.

It can have wildcards, which will delete the eligible file or subdirectory.

Such as: there is a L1 file, L2 subdirectory, L3 file, L4 subdirectory

Deltree L *. * Will delete all the files and subdirectories, but confirm before deleting, if you don't delete it,

You can enter "N".

The / Y parameter is not confirmed when deleting.

It deletes files can be recovered with Undelete, but cannot recover subdirectory and its files, you can use

Take a tool. Such as Norton 8.0, etc.

If Undelete / S is used in advance, you can find a complete file in the SENTRY subdirectory, but name already

changed.

Nine, dos = high [| low [umb | noumb]] DOS = high, UMB DOS will load itself into high-end memory (high) and manage the upper memory (UMB).

Noumb does not manage the last memory.

Before writing DOS = HIGH and UMB, it should be loaded into device = himem.sys

In order to put the program or driver into the upper memory, you must use DOS = UMB to save most of the regular memory.

You can write DOS = HIGH, UMB in any location of config.sys

If HMA NOT AVOIABLE or LOAD DOWN LOW indicates that high-end memory cannot be used.

Ten, doskey records the DOS command used before, can be displayed with F7, use "↑ ↓" to select, use F9 to enter

The selected command number.

Doskey / restall reloads once, before the previous command lines.

DOSKEY / HISTORY displays all commands in memory, ">" can be displayed in other files, abbreviated "/ h".

Doskey Dir = CLS is equivalent to CLS in DIR.

Doskey / macros can display all macro definitions, and you can use ">" to redefine into the file, you can abbreviate "/ m".

Doskey Dir = Macro definition to DIR can be revoked.

Doskey P = DIR $ TDIR * .EXE / P $ TDIR C: / T $ TDIR C: / T $ *

$ T is the distinction of the command, and $ * is the end of the command

Doskey / INSERT (OVERSTRIKE)? When re-entering the command, the modification of the old command is inserted or covered

Cover status (default).

Eleven, Emm386.exe

Provide management of extended memory so that the application can use it using regular memory.

Common usage is in Config.sys

Device = C: /DOS/HIMEM.SYS

Device = C: /DOS/emm386.exe ram

D = 64 sets the number of DMA memory to 64K

NOEMS provides access to the last memory, but does not provide access to extended memory.

It should be noted that it is best not to use it in Windows, because Windows itself is managing extended memory.

The program should be used in Windows.

12, FC command fc / b dt.dat dt2.dat> b (comparison of binary code)

Compare two files, generally used as access schedule, modify the game storage file.

The actual code location should be added 0100, such as: 0000 05E4: 00 67

When you actually use debug -e, you should add 0100 0000 06E4: 00 67

Rear, redirected file "> P" can output the comparison result into the P file.

Thirteen, Format / Q / U / S / N: SECTORS / F: SIZE / C

/ q parameter: Quick formatting, only scanning file allocation tables and root directory, only valid for the formatted disk.

When using it, it should be ensured that there is no new bad track after formatting.

/ U parameter: unconditionally formatted, and does not save information on the original disk, "unformat" can be prevented.

/ s Parameters: Format is a system disk, or you can use the "SYS" command.

/ f: Size size can be 160 180 320 360 720 1200 1440 2800

/ N: SECTOR N can be 1 format is single-sided disk, with a capacity of 160K 180K

360K disk can be formatted on a 5-inch high-density drive

It can be 8 sectors of 8 sectors on a 5-inch high-density driver.

/ c Re-test the bad sector, default If a sector is marked as "bad", it is not from the new test.

Try, only markers, you can test from new tests when using "/ c".

Fourteen, unformat command

The commands are used in format, and the commands that are not used "/ u" parameters work, and it can be re-repaired.

Bad hard disk partition table, but does not work on the network.

Unformat drive: [/ l] [/ test] [/ P]

/ L shows that each file and subdirectory discovered by UNFORMAT, if there is no such switch, only those

Broken files and subdirectory, you can use Ctrl S to pause, press any key to continue ./TEST only makes a test, not actual repair work, making an analog process.

/ p While testing while printing.

Note: This method cannot guarantee that all files are repaired, especially after formatting, adds data from the data.

The recovered file is stored in Subdir1 .... 2 .... 3.

Fifteen, Interlnk Syntax Interlnk G = E, which can communicate between two machines through serial port or parallel port.

Map the E drive on the server side into the client's G drive, and later, all to G

Operation means access to the server, cancel the mapping method for interlnk g =

Introducing Interlnk separates all mappings.

Note: Interlnk must be used in loading the interlnk.exe device driver.

The drive symbol used is related to the number of LastDrv.exe settings in config.?sys. You can make a one

The end is 25 pins, and the other end is a serial line implementation of 9-pin, the specific wiring method is as follows:

5 - 7 2 - 15

3 - 2 3 - 13

7 - 4 4 - 12

6 - 6 5 - 10

3 - 3 6 - 11

8 - 5 15 - 2

4 - 20 13 - 3

9-pin 25-pin 12 - 4

10 - 5

11 - 6

25-25

25-pin 25 needles

XVI, Interlnk.exe and INTERSVR.EXE

Interlnk.exe reorders a request for a client drive or a print interface to another server driver

Merry or printer.

Grammar: config.sys Add:

Device = C: /DOS/interlnk.exe [Drive: n] [/ noprinter] [COM] [lpt]

Seventeenth, Memmaker [/ B] [/ Batch] [session] [/ swap: drive]

Use MemMaker to optimize memory configuration, and write the configuration in AutoExec.bat and Config.sys.

In this process, you need to restart several machines.

Eighteen, Memitem Memcolor Memdefault SubMenu Menu Options Include

Autoexec.bat is as follows: config.sys is as follows:

Path C: / dos; c: / ucdos [menu]

Doskey Menucolor = 15, 1 (foreground color 15, background color 1)

/ mouse / mouse menuItem = base_config, this is a base

Goto% config% -> Select MenuItem = cced_config, this is a cced

Option prompt

: Base_config menudefault = base_config, 5

Goto EXIT -> Jump out of the default as Base_Config, delay time 5 seconds

: cced_config [common]

C: /dos/smartdrv.exe / l device = C: /DOS/HIMEM.SYS

The common part of Goto Exit is included.

: exit -> End [Base_Config]

Device = C: /DOS/emm386.exe ram

DOS = HIGH, UMB

[cced_config]

Device = c: /dos/smartdrv.exe/double_buffer

INCLUDE = base_config contains base_config settings

You can choose from the configuration requirements in different situations.

19. Mscdex.exe provides procedures for the CD-ROM drive

MSCDEX / D: Drive [/ d: drive] [/ e] [/ k] [/ s] [/ l: letter]

Typical: config.sys Device = c: / c: / c: mscd000

Autoexec.bat in C: / DOS / MSCDEX / D: MSCD000 / L: g

Configure a CD-ROM, the symbol is g

Parameters / D: DRIVE1 is the optical drive identity, which must be consistent with the symbols in config.sys, there can be multiple / d: MSCD000 / D: MSCD001

/ E: Install the optical drive driver using the extended memory.

/ S: Does the optical drive in MS_NET or Windows are set to shared drive

/ V Whether to display memory when loading.

/ L: Letter assigned to the drive letter

/ m: Number specifies the number of buffers

It should be noted:

The use of SmartDrv.exe before smartdrv.exe before BAT can be written in smartdrv.exe.

The ability to read and write the drive.

20, MSD

Use the MSD to check the computer configuration and system information as an overall

Including:? Drive parameters, computer CPU parameters, memory size parameters, display type, string. Parallel port,

And each IRQ is occupied, accordingly, it can be analyzed whether the new device conflicts with the original equipment.

At the same time, it can also be analyzed in the memory, and it is determined whether there is a virus in the memory, and it is labeled "???".

21, Prompt DOS prompt

$ Q is equal to $ t Current time $ d Current date $ p Current drive symbol

$$$$ Tip $ n Current drive $ g greater than the number $ L is smaller than $ b Display "|" pipe number

$ h hidden prompt $ e display "<-"

For other words, the text itself is displayed directly, and the LJW prompt is displayed.

PROMPT only displays the current drive letter and greater than the number.

Twenty-two, ramdrive.sys use memory as a virtual disk to use

It should be noted that all data exist in memory, and should save it to the hard disk in time, otherwise the electricity is removed or dead.

All data will be lost, the advantage is fast running, but cannot be used in Windows.

Example: config.sys: device = C: /DOS/ramdrive.sys / size [/ e | a]

Size is the number of bytes in K, that is, the size of the virtual disk established.

/ e or / a is the use of extended memory to establish a virtual disk, the premise of plus parameters is that memory management must be loaded first.

Himem.sys and EMM386.EXE.

Twenty-three, SUBST will join a drive with a subdirectory

If: mapping the request for A: / L1 / L2 subdirectory as a S disk,

Subst S: A: / L1 / L2

This is displayed using the DIR S: ", and the contents of the A: / L1 / L2 subdirectory are displayed, and the other COPY DEL is

This mapping can be canceled with Subst S: D.

You can use Subst to display various coupling situations

Note: • Subst A: C: A can be used to establish a readout disk for A. For some installation software

For it, it is necessary to use A disk to install, you can use all the software you want to install to C: a

In the directory, then enter Subst A: C: a, then go to A:, you can install the software.

Twenty-four, MEM / C / M / P / D regular memory display program

/ c Shows all the occupation of all memory residents, divided into conventional regular memory and UpperMemory

High-end memory occupation and display the total occupation situation (conventional high-end retention expansion memory)

/ P page display, page suspension

/ m After adding the module name, like: / m MSDOS Displays the occupation of the DOS system memory.

/ d Detailed explanation of conventional high-end retention expansion memory

Through analysis, it can be seen that memory occupation is reasonable, and whether the various programs are loaded normally, thereby

Based on the memory optimization tool MemMaker, you can analyze some program crash.

The reason, if there is a "???", it can determine the existence of viruses in memory, which is conducive to discovering and elimination.

Twenty-five, use of various pipe tools "> <>> <<"

Redirect the output caused by various commands or the input required

Such as: DIR * .BAT / B> P can output the file name of DIR * .BAT to the P file.

Time

> p.bat

There is only one carriage return in the P file, and the time can be added to the P.bat file.

">>" is reordering the output generated by the command, such as in a file or printer.

>> The content generated will be added in the document,>, override the original file content. "<<<" is re-directioning the content you need to enter.

Such as: Time

It should be noted that "PRN" is the printer, "NULL" is an empty device

CON is a display

TYPE P.BAT> PRN can print P.BAT.

Copy NULL P can delete P files

COPY CON P can edit P files on the screen, F6 can store exit

TYPE P> PP completes P files to PP replication

TYPE P | More can be paused at the full screen

Twenty-six, Move command

Move [Y / -Y] filename1 filename2

Move file 1 to file 2

Such as: Move C: / DOS /*.* C: / Cced

Move all of the files in the DOS subdirectory to the ccedonic subdirectory

/ y | -y parameter does not have a prompt when there is no need to create in the target directory

You can use this command to modify the subdirectories, such as Move DOS CCED

Change the DOS directory name to cced

Twenty-seven, append specifies some storage locations such as User.dat PE2.Pro, etc.

EXE * .com * .bat file

Format: append [:] Terminate the specified directory Append display of the previously existing specified directory display specified

Append [PATH] APPEND C: / User, etc.

Twenty eight, Call calls another batch file in a batch command

(1) Do not terminate the operation of the existing file, return it immediately after the program is required.

(2) The transferred batch command must be extended as BAT

(3) When the batch file can be adjusted, the parameters (% 1-% 9) and environment variables such as% BAUD% can be added.

(4) Do not use pipe tools and redirectors

Twenty-nine, Device DeviceHigh Loadhigh

Device puts the specified device driver into memory

DeviceHigh puts the specified device driver into high-end memory

LoadHigh puts the specified device driver into high-end memory

Thirty, DEFRAG Optimization Disk

Legend (Legend) Optimize (Outing) ELAPSE (Due) Fragment (Debris)

This command performs optimization processing of the specified disk (including check file allocation table, each file status, corrective error

Mistaken), when executed, can be sorted according to the size, time and extension of the file name.

First, DIR

Before DOS5.0, DIR has only two parameters / p, / w.

DIR / A: You can see all files in the current directory, including hidden, system, read-only files.

DIR / S: You can see files in the current directory, including files in subdirectories.

However, although DIR / A / S can see the hidden catalog in the current directory, you cannot see files in the hidden directory.

Second, XCOPY

/ E: If a subdirectory is also copied when a child is empty.

/ S: Only copy non-empty catalog

Third, ERASE = DEL

Fourth, FC

Use the most when modifying the game.

Five, format

/ T: TRACKS This parameter is used with / N. It indicates that the floppy disk is to be formatted to Tracks tracking tracks. If you want to use the floppy capacity of more than 1.44m, use / t and / n. / T: 80 / N: 18 is 1.44m.

/ 1: Format one (compatible for the previous single floppy disk)

/ 4: Format into a low-end disk.

Six: ramdrive.sys

/ E and / A uses EMS, one for XMS.

转载请注明原文地址:https://www.9cbs.com/read-30706.html

New Post(0)